https://issues.apache.org/bugzilla/show_bug.cgi?id=41959
--- Comment #6 from Jeremias Maerki <[EMAIL PROTECTED]> 2008-12-01 01:05:13 PST --- I'm sorry that I'm a little late here but I fear the approach you both have taken is probably not the best one. Some background: When I write the PDF-in-PDF extension I needed generic PDF structures (arrays, dictionaries etc.) to I could easily transform the PDFBox model into something that can be processed by FOP's PDF library. That's when I introduced PDFArray, PDFDictionary & Co. The thing is: I've only converted some of the existing PDF classes to use the generic structures, yet. Now, fixing the encryption problem only for this special case seems like a bad idea. You may remember we had a similar problem with the PDF outlines (fo:bookmark) in the past. So we're essentially fixing the same bug in different places. A better idea would be to convert the existing PDF classes to use the generic structures when they need to be touched. Yesterday, I've had some train time (a rare resource lately) and I've converted all the classes related to Actions to use PDFDictionary. That reduces the number of lines of code quite a bit and made the code more readable. I have one remaining problem before my changes are in a state to be committed: I noticed (a little late) that there are two different string types: strings and text strings. String objects are currently treated as if they are "text strings", i.e. allow Unicode. But "strings" (as used by the "URI" dict entry) cannot use Unicode. So I probably have to introduce a "PDFString" class that simply carries a "string" object and handles the encoding (especially in the encryption case) correctly. BTW, Andreas, the reuse of URI actions may not always be a good idea since the URI alone may not uniquely identify a URI action. There's also a dictionary entry "IsMap" which offers additional functionality. I'm also not entirely sure if this should be a functionality PDFDocument has to offer. This can easily be done outside the PDF library. I'm not saying this is wrong but I wonder if we don't bloat the whole PDF library too much with stuff like this. OTOH, even in PDF 1.7 the URI action doesn't support more than the "URI" and "IsMap" entries, so if your look-up method includes both the parameters, it should be safe. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
