> On 16 Jun 2016, at 12:56, Andreas Lehmkuehler <[email protected]> wrote:
> 
> Am 16.06.2016 um 18:09 schrieb Tilman Hausherr:
>> I'd be interested in this, but not as an extension, rather as a change in the
>> trunk. Our two main java competitors both can do it.
>> 
>> I'd prefer that the PDFRenderer and PageDrawer remain as they are, but that 
>> the
>> PDFRenderer gets a new setter for the map, e.g. setOCG() or setOCGMap(). This
>> map would then be passed in PageDrawerParameters. Btw shouldn't we put into 
>> the
>> map what we want to keep? Is there a good argument to do it one way or the
>> other? Do we have to care about the hierarchy?
>> 
>> The IDs are in the PDF... open a file with the PDFDebugger-App and you'll 
>> see :-)
>> 
>> There is a file with OCGs at PDFBox
>> reactor\pdfbox\target\test-output\ocg-generation.pdf
>> 
>> Other files with layers:
>> - gs-bugzilla689931.pdf
>> - gs-bugzilla693548-STACKOVERFLOW.pdf
>> - gs-bugzilla692933.pdf
>> - many maps at http://ims.er.usgs.gov/images/USTopo/ (the huge files)
>> 
>> So if you're willing to change your code accordingly, please open an issue in
>> JIRA, and attach your code as a patch / diff.
> There is already some code handling those operators, see 
> PDFMarkedContentExtractor. It could be moved to a more generic place so that 
> we have to add some filtering only.

Yes, that's is the proper way to handle this. Operators are handled with a an 
OperatorProcessor, not my modifying the parser (e.g. processStreamOperators). 
Better yet, we already have the code to handle BMC/EMC. All that is needed is 
for PDFRenderer to add a constructor which accepts a list of layer names to 
render, which are then passed as part of PageDrawerParmeters.

— John

> BR
> Andreas
>> https://issues.apache.org/jira/browse/PDFBOX
>> 
>> Tilman
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to