You'll want to search the mailing lists for information on named 
destinations, that was just discussed recently and there's good 
information there.  I believe it was all on the dev mailing list.  I've 
only worked with normal bookmarks (which merely point to a page), not 
named destinations (which point to a specific place within a page). 
However the dev mailing list archive should help you write code to get the 
destination based on the name.  Once you have the destination, it should 
be simple.

As for your goal, there's a bit of a problem.  A bookmark just points to a 
specific place in the document, it doesn't point to a block of text.  For 
example, imagine a bookmark which points to page 7.  So do you take pages 
8, 9 and 10 in addition to all the text on page 7?  Maybe it belongs, or 
maybe it doesn't.  One option would be to take all the text up until the 
point where you hit the next bookmark.  If you always have a bookmark for 
each section of interest, this should work out well.

>From my experience, and what I've heard from others, named destinations 
seem to be fairly rare.  If you're not generating the documents, you might 
never even run into them.  So it you may be able to get away with just 
writing code to handle the normal bookmarks.  As for your methodology, 
starting with the document outline is good.  I don't think you'll need to 
compare the title with anything.  The title will not always match up with 
text in the document (although it should be close).  As long as you know 
where this bookmark is, and where the next bookmark is, extracting the 
text in between should not be too difficult.  I've not done any text 
extraction either, but there are others on the mailing lists which can 
chime in and help you with that.

---- 
Thanks,
Adam





From:
"Aboubacar Kaba" <[email protected]>
To:
<[email protected]>
Date:
07/27/2010 09:47
Subject:
Extracting content string corresponding to a bookmark



IHi,

 

I'm developing a tool that takes in a name of bookmark (or section or
sub section title) and extracts that title and all paragraphs belonging
to it (underneath).

 

The approach I'm trying out is to get the document catalog and take each
PDOutineItem from there and compare the title of these outline items.
The matched item is then used to go to the page where a
PDNamedDestination is set. And I want to use that name destination to
extract the title and the text of the corresponding destination. But I'm
really stuck a this point as the only information I can get from the
named destination is the name. 

 

So my question is how to get exactly the content that corresponds to a
PDNamedDestination?

 

If this is not possible, is there any other possible approach that can
help me achieve the goal described above?

 

Thanks a lot in advance,

 

Aboubacar,




?  Click here to submit conditions  

This email and any content within or attached hereto from  Sun West Mortgage 
Company, Inc.  is confidential and/or legally privileged. The information is 
intended only for the use of the individual or entity named on this email. If 
you are not the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or the taking of any action in reliance on 
the contents of this email information is strictly prohibited, and that the 
documents should be returned to this office immediately by email. Receipt by 
anyone other than the intended recipient is not a waiver of any privilege. 
Please do not include your social security number, account number, or any other 
personal or financial information in the content of the email. Should you have 
any questions, please call  (800) 453 7884.   

Reply via email to