Hi Adam, try one of these
http://svn.apache.org/repos/asf/incubator/pdfbox/trunk http://svn.apache.org/viewvc/incubator/pdfbox/trunk/ Andreas Lehmkühler Adam Nichols schrieb: > Added as https://issues.apache.org/jira/browse/PDFBOX-493 > > Is the head tag available via http(s) anywhere? I'd like to provide a > nice .patch file but the proxy I'm forced to use is broken when it comes > to SVN. If I can get a copy of PDDocument.java and COSArrayList.java from > the head tag I'll create and upload a patch file straight away. > > Thanks, > Adam > > > > > "Andreas Lehmkühler" <[email protected]> > 07/13/2009 23:49 > > To > "Adam Nichols" <[email protected]>, "Adam Nichols" <[email protected]> > cc > [email protected] > Subject > Re: Re: Get page number for bookmark > > > > > > > Hi Adam, > >> .... >> I'm not sure how to contribute it back to the project other than posting > >> to this list. As I understand it JIRA is for bugs, and this is not a > bug, >> it's a feature addition. I've tested this code with a few PDFs from >> various sources and it's working fine. I removed the templates so it's >> compatible with Java 1.4. Hopefully this code will be accepted and get >> put in the HEAD tag so it can help other people. > JIRA isn't limited to bugs, it is some sort of a tracker system for every > kind of task concerning the development of software. Of course there are > issues filed for improvements too. > Please create an issue on jira and choose "Improvement" as type. Attach > your code to it if possible as diff against the current trunk. Please > don't forget to grant the license to the ASF by activating the checkbox in > the bottom of the attachment formular. > > Thanks a lot for the contribution, > > Andreas Lehmkühler > >> If there are any questions as to the logic which aren't answered in the >> Adobe Specification for PDF, let me know and I'll explain. >> >> --Adam >> >> >> >> >> Adam Nichols/UR/CER/XLDynamics >> 06/02/2009 11:24 >> >> To >> [email protected] >> cc >> >> Subject >> Re: Get page number for bookmark >> >> >> >> >> >> toArray returns an array of PDPage objects. Since the PDPage objects do > >> not contain the page ID (as far as can tell), this will not suffice. >> Likewise iterator() and listIterator() both iterate over collections of >> PDPages. What I need is a list of object IDs for the pages; I don't > want >> the actual data in the pages. >> >> --Adam >> >> >> >> >> Andreas Lehmkühler <[email protected]> >> 05/31/2009 10:25 >> Please respond to >> [email protected] >> >> >> To >> [email protected] >> cc >> >> Subject >> Re: Get page number for bookmark >> >> >> >> >> >> >> Hi Adam, >> >> did you ever try to use one of the following methods: >> >> COSArrayList.iterator >> COSArrayList.listIterator >> COSArrayList.toArray >> >> All of them should return the data you're looking for. >> >> Andreas Lehmkühler >> >> Adam Nichols schrieb: >>> I propose the following function is added to COSArrayList. >>> >>> public COSArray toList() >>> { >>> COSArray copy = new COSArray(); >>> for(int i=0; i < array.size(); ++i) >>> copy.add(array.get(i)); >>> return copy; >>> } >>> >>> This returns a copy of the array to ensure the callers can't modify > the >>> internal array variable. Callers already have access to this >> information >>> as it is the same data as is returned by toString() just in a more >> useful >>> format. If it's OK to give the callers the ability to modify array >>> directly, a reference could simply be returned. >>> >>> I needed this because I got the "indirect reference to a page object" >> from >>> the target listed in a GoTo action and needed the page number. By > using >>> the method above I was able to get the page references in the catalog >> and >>> thus was able to determine the page number based on the page object id > I >>> had. >>> >> >> > > --- original Nachricht Ende ---- > > >
