Matthias Uhler wrote: > > > sam krasnik wrote: >> >> >> I did the same thing (I created a sub-interface of PdfPageEvent to have >> an onAddPage method, which passes my a PdfPage which I can add stuff to), >> and came up with the attached pdf. Unfortunately, after looking at it for >> a while, I can't see the difference between your final "test.pdf" and >> mine. The only difference is the slight difference in dimensions and >> dictionary key order. Please let me know if I'm missing something. >> >> http://www.nabble.com/file/p21609305/geo_base.pdf geo_base.pdf >> >> thanks, >> >> --sam >> > > you have to define the viewport-dictionary as an array-object because ther > could be more than one viewports! In your code the [ and ] around the > viewport-dictionary are missing... > > I noticed that you put 2 viewport-dictionaries to the document. > You can put an indirect reference after the /VP entry to your object 4 > like this: > > /VP 4 0 R > > the reference allocates to the viewport-array which should be written like > that: > > obj 4 0 > [<</Type /Viewport ... /Measure 3 0 R...>>] > endobj > > dont't mind about the key order, it's irrelevant in a dictionary. > > let me know if it works, you're welcome! > > greets matthias > >
If you are interested in creating pdf maps, you might want to check out the project this is for at http://code.google.com/p/layers3pdf. Thanks to your thread, it now also supports geo-referencing (the documentation for that hasn't been written yet, but there are examples in the svn trunk) it uses a configuration file format that allows you to define layers, their properties and the dictionaries for geo-referencing without having to write any code. --sam -- View this message in context: http://www.nabble.com/how-to-construct-a-geospatial-measure-dictionary--tp20703775p21624537.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php