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

Maruan Sahyoun commented on PDFBOX-2625:
----------------------------------------

PDF/A-1b (unfortunately) only states that the width „… shall be consistent …“. 
For PDF/A-2,3 the description has been enhanced and is now requesting „… 
consistent is defined to be a difference of no more than 1/1000 unit.“. So 
truncating it as is currently done is not OK as we will loose the information 
we have and are required to use.

> Preflight error: The character with CID 0 should have a width equals to 57.0, 
> but has 57.78 on page 50
> ------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2625
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2625
>             Project: PDFBox
>          Issue Type: Sub-task
>          Components: FontBox, Preflight
>    Affects Versions: 2.0.0
>            Reporter: Tilman Hausherr
>              Labels: type3
>         Attachments: rolfs_diss_A1b.pdf
>
>
> Preflight brings these error message for the attached file. This is related 
> to two type3 "fonts".
> {code}
> 3.1.6 : Invalid Font definition, T1: The character with CID 0 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 3 should have a 
> width equals to 17.0, but has 17.75999 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 4 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 6 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 8 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 9 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 3 should have a 
> width equals to 17.0, but has 17.75999 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 10 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 12 should have a 
> width equals to 17.0, but has 17.76 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 13 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 15 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 16 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 17 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 3 should have a 
> width equals to 17.0, but has 17.75999 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 13 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 14 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 18 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 19 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 17 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 20 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 21 should have a 
> width equals to 48.0, but has 48.84 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 15 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 14 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 13 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 14 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 22 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 23 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 3 should have a 
> width equals to 17.0, but has 17.75999 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 24 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 15 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 25 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 12 should have a 
> width equals to 17.0, but has 17.76 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 26 should have a 
> width equals to 66.0, but has 66.60001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 27 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 13 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 28 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 1 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 29 should have a 
> width equals to 48.0, but has 48.84 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 30 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 11 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 0 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 3 should have a 
> width equals to 17.0, but has 17.75999 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 13 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 11 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 12 should have a 
> width equals to 17.0, but has 17.76 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 15 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 31 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 15 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 26 should have a 
> width equals to 66.0, but has 66.60001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 2 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 14 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 4 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 27 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 32 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 21 should have a 
> width equals to 48.0, but has 48.84 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 24 should have a 
> width equals to 57.0, but has 57.78 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 27 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 21 should have a 
> width equals to 48.0, but has 48.84 on page 50
> 3.1.6 : Invalid Font definition, T1: The character with CID 21 should have a 
> width equals to 48.0, but has 48.84 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 0 should have a 
> width equals to 53.0, but has 53.34 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 1 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 4 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 5 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 4 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 6 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 7 should have a 
> width equals to 26.0, but has 26.64 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 8 should have a 
> width equals to 40.0, but has 40.02 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 9 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 10 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 12 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 4 should have a 
> width equals to 22.0, but has 22.2 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 6 should have a 
> width equals to 44.0, but has 44.46001 on page 50
> 3.1.6 : Invalid Font definition, T2: The character with CID 8 should have a 
> width equals to 40.0, but has 40.02 on page 50
> {code}
> The widths on the left of the error messages can be seen below, they are 
> truncated to int in Type3FontValidator.getWidths().
> {code}
> 459 0 obj
> <</Subtype/Type3/LastChar 33/Widths[57.78 44.46 22.2 17.76 44.46 44.46 44.46 
> 62.22 57.78 53.34 40.02 44.46 17.76 40.02 44.46 26.64 40.02 53.34 26.64 22.2 
> 26.64 48.84 53.34 44.46 57.78 44.46 66.6 53.34 44.46 48.84 44.46 22.2 57.78 
> 53.34]/Name/T1/FirstChar 0/FontMatrix[0.01 0 0 0.01 0 0]/FontBBox[-53.16 
> -25.98 159.96 80.46]/Resources 105 0 R/Encoding 106 0 R/Type/Font/CharProcs 
> 141 0 R>>
> endobj
> 460 0 obj
> <</Subtype/Type3/LastChar 12/Widths[53.34 40.02 40.02 17.76 22.2 44.46 44.46 
> 26.64 40.02 22.2 44.46 44.46 44.46]/Name/T2/FirstChar 0/FontMatrix[0.01 0 0 
> 0.01 0 0]/FontBBox[-80.88 -26.34 180.78 86.22]/Resources 142 0 R/Encoding 143 
> 0 R/Type/Font/CharProcs 157 0 R>>
> endobj
> {code}
> The widths on the right of the error messages can be found in the type3 
> "font" streams and are set by the first parameter of the d0 or the d1 
> operator. They are indeed 44.46001, 17.75999, 66.60001, 17.75999. 
> [~msahyoun] Does the PDF/A-1b specification request identity, integer 
> identity, or difference below a fractional value for the widths?



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

Reply via email to