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

John Hewson commented on PDFBOX-2562:
-------------------------------------

The FontBox API can certainly be added to, however FontBox wasn't built for 
doing validation, the code is written in such a way that it reads as little of 
the font file as it can, in the most forgiving manner possible. This applies to 
TTFs, CFFs, and Type 1 fonts. The sorts of details that one might want to 
validate are things we don't even bother to parse, because they aren't 
necessary.

FontBox is a stand-alone package, so we can't add any dependency between it and 
preflight, so it can't return ValidationWarning objects, etc.

In general, if you want to do font validation, then FontBox is not the answer. 
You'd need a ground-up rewrite of the Type1 and TTF parsers, with a ton of 
extra features, and some heavy modification to the CFF parser. FontBox needs to 
be fast by default, and trying to validate font files on-the-fly as part of its 
normal processing would be quite a drag.

> create ValidationWarnings
> -------------------------
>
>                 Key: PDFBOX-2562
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2562
>             Project: PDFBox
>          Issue Type: Sub-task
>          Components: Preflight
>    Affects Versions: 2.0.0
>            Reporter: Ralf Hauser
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> as seen in the parent Issue PDFBOX-2513 , pdf/A1 is not required to validate 
> other standards like TIFF completely.
> On the other hand, the information from the CCITTFaxDecoder is valuable and 
> shouldn't be simply discarded.
> Therefore, I suggest that this information is displayed without setting the 
> validation result to false.
> ValidationWarnings could have the same logical structure as ValidationError .



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

Reply via email to