On Mon, Nov 29, 2010 at 01:14:58AM -0500, Roger Burrows wrote: > Hi Michal,
Hi, > I thought it would be a good thing for me to understand a little bit about > the > file structure of PDFs. So I started by writing a simple program to display > the file structure of a PDF, based on section 7.5 of the PDF 1.7 manual. I > looked at a lot of PDFs, as well as the one delinearized by PDFEDIT, and I > see > one thing that is definitely different: the cross-reference table of the > delinearized PDF has no object zero. > > In section 7.5.4 of the PDF 1.7 reference manual on page 41, it says: > The cross-reference table (comprising the original cross-reference section > and > all update sections) shall contain one entry for each object number from 0 to > the maximum object number defined in the file, even if one or more of the > object numbers in this range do not actually occur in the file. > > So (with great hesitation because I am ignorant of the remaining 700+ pages > of > the manual), it seems to me that the problem with reading the delinearized > output may be because there is no entry for object zero. You can check that easily. Just edit the delinearized document and replace: xref -1 263 +0 264 +0000000000 65535 f \n Make sure that you do not edit anything before xref keyword and that that the added entry has exactly 20B (if you are using DOS EOL - \r\n then you have to skip the space after `f'). I have another suspicion that the problem might be related to UNIX vs. DOS EOL. This shouldn't be a problem because the specification is rather clear on the EOL but who knows. If the first test with the object 0 doesn't pass then I would try to update each entry to use DOS EOL. Let's see > > Hope this helps, > Roger Burrows Thanks! -- Michal Hocko ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Pdfedit-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdfedit-support
