The PDF list is a service provided by PDFzone.com | http://www.pdfzone.com __________________________________________________________________
From: "Teresa Rippeon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [PDF] Named destinations repeated twice Date sent: Thu, 11 Dec 2003 10:35:10 -0500 Organization: Mantech Send reply to: [EMAIL PROTECTED] > > The PDF list is a service provided by PDFzone.com | http://www.pdfzone.com > __________________________________________________________________ > > > I am trying to open the PDF file as a text file and pull out the named > destinations in the file by looking at the "/Names [ ]" section. > Unfortunately, after adding additional named destinations, there are two > such sections in the PDF file, so if I pull out both sections, my list of > named destinations supposedly used in the PDF file contains a repeat of many > of the named destinations. > > Here's an example... > > > I have created a PDF file and then added some named destinations. In the > resulting PDF file, looking at it in the text editor, I see a section > showing the named destinations... > > Line #14000 > /Names [ (3.10.8 Summary of Differences)5608 0 R (3.10.9 Selecting a > Training Site) > 5614 0 R (3.10.9.1 Identifying Resources for the CCMM Training Site) > 5620 0 R (3.10.9.1.1 Facility)5629 0 R (3.10.9.1.2 Funding)5635 0 R > (Chapter 2)5598 0 R (Chapter 3)5603 0 R (Figure 1-1)5592 0 R (Introduction > To AIM I) > 5586 0 R ] > > Then I modified the PDF file by adding more named destinations. In the > resulting PDF file, looking at it in a text editor, I see two sections > showing the named destinations. > > > Line #14000 > /Names [ (3.10.8 Summary of Differences)5608 0 R (3.10.9 Selecting a > Training Site) > 5614 0 R (3.10.9.1 Identifying Resources for the CCMM Training Site) > 5620 0 R (3.10.9.1.1 Facility)5629 0 R (3.10.9.1.2 Funding)5635 0 R > (Chapter 2)5598 0 R (Chapter 3)5603 0 R (Figure 1-1)5592 0 R (Introduction > To AIM I) > 5586 0 R ] > > Line #21000 > /Names [ (1.0 Introduction to AIM I)5646 1 R (1.2 Hardware and Software > Requirements) > 5651 0 R (3.10.8 Summary of Differences)5608 0 R (3.10.9 Selecting a > Training Site) > 5614 0 R (3.10.9.1 Identifying Resources for the CCMM Training Site) > 5620 0 R (3.10.9.1.1 Facility)5629 0 R (3.10.9.1.2 Funding)5635 0 R > (Chapter 2)5598 0 R (Chapter 3)5603 0 R (Figure 1-1)5592 0 R (Introduction > To AIM I) > 5586 0 R ] > > > How can I determine that I need to only use the second block of named > destinations....because in another case of a PDF file, all of the named > destinations are broken into a couple of named destinations sections. So, I > can't decide to only use the last case of a named destinations block that I > see. > > Any suggestions? Thanks SO much!! > The only reliable way of doing this is to use the PDF's structure. Find startxref, read the xref table, read trailer to find Root, find Names entry in Root and then follow through reference-by-reference until you end up at the info you want. > Teresa Rippeon > > > To change your subscription: > http://www.pdfzone.com/discussions/lists-pdf.html > -- Matthew Fitzgerald Byte Ryte bv Oudegracht 219 NL 3511 NH Tel: +31 (0)30 2380023 Fax: +31 (0)30 2380076 http://www.byteryte.nl To change your subscription: http://www.pdfzone.com/discussions/lists-pdf.html
