Skip navigation
Doug0101
Currently Being Moderated

Pdf Header Format Question

Mar 22, 2013 9:56 AM

Hello, I have a question about the PDF header. I have noticed that we have some pdf's that have a header like "%PDF-1.3\r\n", note that this header has both a carraige return and line feed (\r\n). Then I have some other PDF's with a header like "%PDF-1.5\r", this has only a carraige return and NO line feed. Is the header without the line feed still valid? I have done some page extracts from Adobe Acrobat Pro (v 8.1.0) and noticed that when saving the page extracts from the Adobe software it also creates a header without a line feed character, so I'm guessing this is valid but would like confirmation. Thank you for your time.

 
Replies
  • Currently Being Moderated
    Mar 22, 2013 10:29 AM   in reply to Doug0101

    This is all described in section 7.5 of the PDF spec (File Structure). In

    7.5.1 (General), you'll find the following about the line endings: "Each

    line shall be terminated by an end-of-line (EOL) marker, which may be a

    CARRIAGE RETURN (0Dh), a LINE FEED (0Ah), or both. "

     

    So, you can use one of the three different methods of ending a line: \r, \n

    or \r\n

     

     

     

    Karl Heinz Kremer

    PDF Acrobatics Without a Net

    PDF Software Development, Training and More...

     

    khk@khk.net

    http://www.khkonsulting.com

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points