Did you have any luck here, Chemi? On Mon, Jul 19, 2010 at 7:57 AM, Chemi <[email protected]> wrote:
> On 7/19/2010 1:31 PM, Kevin Brown wrote: > >> Pleasure to meet a fellow named destination seeker! >> >> You have done what I was able to do and more, so far. I have only been >> able >> to edit existing named destinations so far, I'm afraid. >> >> In fact, I found that if you use this method to change the names of named >> destinations, their properties are changed to the point that they are not >> usable. I am still working on this as time permits. >> >> What version of PDFBox are you on, BTW? It's up to 1.2 now, FYI. Not sure >> if >> that would help, or not. I'm still on the last version. >> > > I am using 1.2.0 too. > I found really cryptic how to use the API to add those destinations. I > understand nobody in the list is aware of any sample, tutorial or what ever > piece of doc about this topic. Right? > > As I commented before, I was able to add a Destination and verified it > worked more or less fine. I said it worked because I was able to issue: > > AcroRd32.exe /A "nameddest=CHEMI" PDFOpenParameters2.pdf > > and it was opened exactly where I said: 500,500. > > But I said more or less, because: > > - Adobe Acrobat (not the reader) doesn't show the destinations correctly > once I added mine. It is not an issue for my objective but wondering why... > > - I don't find an easy way to add destinations to specific lines of > code. I am not able to get the coords of a COString. And BTW, in my PDFs > there are tons of COStrings, most of them based on a single letter of a > word. Gulp! > > I was thinking about extracting all the content to a StringWriter in > memory, split the content in lines, and perform math calculations to know in > which page I am, and which should be the coords for such line. Although I > think this is not a good way to achieve this. Of course, I base tis solution > in the idea that all my PDFs have text, using the same font, etc... > > It seems coord 0,0 is the most down,left point of a page, while 0,800 is > the most up,left one. I got this info testing, so it is not accurate. > > Any advise? > > Thanks again, > > Chemi. >

