[ 
https://issues.apache.org/jira/browse/PDFBOX-2362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14139434#comment-14139434
 ] 

John Hewson commented on PDFBOX-2362:
-------------------------------------

I've added a new addOperator() method to handle this, 
registerOperatorProcessor() is still available for now but deprecated. I've 
encapsulated the operator name into the OperatorProcessor class so that we 
don't need to manually pass them as a string each time.

I also noticed we were missing two operators, for setting the rendering intent 
and flatness tolerance, which I added.

The warnings which were given on "unknown or disabled" operators have been 
removed from the PDFStreamEngine as these were not desirable in most 
subclasses, nor were customisable. Instead there's a new unsupportedOperator() 
method which can be overridden by subclasses which are interested in logging 
errors.

> Remove .properties file usage in PDFStreamEngine
> ------------------------------------------------
>
>                 Key: PDFBOX-2362
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2362
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>            Reporter: John Hewson
>            Assignee: John Hewson
>
> PDFStreamEngine and its subclasses currently load a list of OperatorProcessor 
> classes from .properties files. This makes it difficult to override the 
> classes, as the .properties files also need to be copied and pasted if 
> changes are made. Worse still, subclasses in other modules are known to load 
> .properties files from the pdfbox module which breaks OSGi, as discovered in 
> PDFBOX-2358.
> There is currently an API, registerOperatorProcessor() which performs the 
> same role. This should be adapted for use in subclasses, perhaps deprecated 
> and replaced with something less brittle which doesn't require manually 
> assigning operators to specific strings such as "BT" or "T*".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to