You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2021/05/14 07:34:00 UTC

[jira] [Resolved] (PDFBOX-5191) isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2

     [ https://issues.apache.org/jira/browse/PDFBOX-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-5191.
-------------------------------------
      Assignee: Tilman Hausherr
    Resolution: Fixed

I did the changes for 2.0. Thank you so much for all your work in this [~larry.lynn@workiva.com], wow!

> isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-5191
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5191
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.21, 3.0.0 PDFBox
>            Reporter: Larry Lynn
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.24, 3.0.0 PDFBox
>
>         Attachments: 2021-05-13_15-20-29.png
>
>
> PDFBOX-4882 fixed a bug that made isEmbeddingPermitted() too permissive.  But it introduced a bug that made isEmbeddingPermitted() too restrictive for TTFs with OS2 table versions 0-2.
>  
> TTFs with OS2 table versions 0-2 can have multiple permission bits set.  According to the spec described in 
> [https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fstype]
> "in the event that more than one of bits 0 to 3 are set in a given font, then the _least-restrictive permission indicated take precedence_."
> Unfortunately, the current code essentially makes the most restrictive permission take precedence.  This causes pdfbox to throw an error: 
> "This font does not permit embedding"
> when attempting to process fonts that worked fine in pdfbox v2.0.20 and lower



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: [jira] [Resolved] (PDFBOX-5191) isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2

Posted by Andreas Lehmkuehler <an...@lehmi.de>.
Hi,

we didn't discused a possible 2.0.24 release but likely I'm going to cut it 
soon. There are still some issues we'd like to fix first

Andreas

Am 14.05.21 um 22:22 schrieb Larry Lynn:
> Hi Tilman,
> 
> 
> 
> 
> Thank you for your help with this issue.  I see you backported the tests to
> the 2.0 branch as well, so it looks like there is nothing remaining for me
> to do there.
> 
> 
> 
> 
> I'm glad I could be of service.  We make extensive use of pdfbox and other
> software from the Apache foundation.  Since you do so much for us, it felt
> pretty good to give something back.
> 
> 
> 
> 
> I checked the pdfbox release history here:
> 
> https://pdfbox.apache.org/blog/
> 
> 
> I see that there is a variable amount of time between releases.  Do you
> have an estimate of when pdfbox 2.0.24 will be released?  We would like to
> upgrade our software to use pdfbox version 2.0.24 or higher once it is
> publicly available.
> 
> 
> Thanks and Regards,
> 
> Larry Lynn
> 
> On Fri, May 14, 2021 at 1:34 AM Tilman Hausherr (Jira) <ji...@apache.org>
> wrote:
> 
>>
>>       [
>> https://issues.apache.org/jira/browse/PDFBOX-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>> ]
>>
>> Tilman Hausherr resolved PDFBOX-5191.
>> -------------------------------------
>>        Assignee: Tilman Hausherr
>>      Resolution: Fixed
>>
>> I did the changes for 2.0. Thank you so much for all your work in this [~
>> larry.lynn@workiva.com], wow!
>>
>>> isEmbeddingPermitted() is too restrictive on TTFs with OS2 table
>> versions 0-2
>>>
>> -----------------------------------------------------------------------------
>>>
>>>                  Key: PDFBOX-5191
>>>                  URL: https://issues.apache.org/jira/browse/PDFBOX-5191
>>>              Project: PDFBox
>>>           Issue Type: Bug
>>>           Components: PDModel
>>>     Affects Versions: 2.0.21, 3.0.0 PDFBox
>>>             Reporter: Larry Lynn
>>>             Assignee: Tilman Hausherr
>>>             Priority: Major
>>>              Fix For: 2.0.24, 3.0.0 PDFBox
>>>
>>>          Attachments: 2021-05-13_15-20-29.png
>>>
>>>
>>> PDFBOX-4882 fixed a bug that made isEmbeddingPermitted() too
>> permissive.  But it introduced a bug that made isEmbeddingPermitted() too
>> restrictive for TTFs with OS2 table versions 0-2.
>>>
>>> TTFs with OS2 table versions 0-2 can have multiple permission bits set.
>> According to the spec described in
>>> [https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fstype]
>>> "in the event that more than one of bits 0 to 3 are set in a given font,
>> then the _least-restrictive permission indicated take precedence_."
>>> Unfortunately, the current code essentially makes the most restrictive
>> permission take precedence.  This causes pdfbox to throw an error:
>>> "This font does not permit embedding"
>>> when attempting to process fonts that worked fine in pdfbox v2.0.20 and
>> lower
>>
>>
>>
>> --
>> This message was sent by Atlassian Jira
>> (v8.3.4#803005)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: dev-help@pdfbox.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Re: [jira] [Resolved] (PDFBOX-5191) isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2

Posted by Larry Lynn <la...@workiva.com>.
Hi Tilman,




Thank you for your help with this issue.  I see you backported the tests to
the 2.0 branch as well, so it looks like there is nothing remaining for me
to do there.




I'm glad I could be of service.  We make extensive use of pdfbox and other
software from the Apache foundation.  Since you do so much for us, it felt
pretty good to give something back.




I checked the pdfbox release history here:

https://pdfbox.apache.org/blog/


I see that there is a variable amount of time between releases.  Do you
have an estimate of when pdfbox 2.0.24 will be released?  We would like to
upgrade our software to use pdfbox version 2.0.24 or higher once it is
publicly available.


Thanks and Regards,

Larry Lynn

On Fri, May 14, 2021 at 1:34 AM Tilman Hausherr (Jira) <ji...@apache.org>
wrote:

>
>      [
> https://issues.apache.org/jira/browse/PDFBOX-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Tilman Hausherr resolved PDFBOX-5191.
> -------------------------------------
>       Assignee: Tilman Hausherr
>     Resolution: Fixed
>
> I did the changes for 2.0. Thank you so much for all your work in this [~
> larry.lynn@workiva.com], wow!
>
> > isEmbeddingPermitted() is too restrictive on TTFs with OS2 table
> versions 0-2
> >
> -----------------------------------------------------------------------------
> >
> >                 Key: PDFBOX-5191
> >                 URL: https://issues.apache.org/jira/browse/PDFBOX-5191
> >             Project: PDFBox
> >          Issue Type: Bug
> >          Components: PDModel
> >    Affects Versions: 2.0.21, 3.0.0 PDFBox
> >            Reporter: Larry Lynn
> >            Assignee: Tilman Hausherr
> >            Priority: Major
> >             Fix For: 2.0.24, 3.0.0 PDFBox
> >
> >         Attachments: 2021-05-13_15-20-29.png
> >
> >
> > PDFBOX-4882 fixed a bug that made isEmbeddingPermitted() too
> permissive.  But it introduced a bug that made isEmbeddingPermitted() too
> restrictive for TTFs with OS2 table versions 0-2.
> >
> > TTFs with OS2 table versions 0-2 can have multiple permission bits set.
> According to the spec described in
> > [https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fstype]
> > "in the event that more than one of bits 0 to 3 are set in a given font,
> then the _least-restrictive permission indicated take precedence_."
> > Unfortunately, the current code essentially makes the most restrictive
> permission take precedence.  This causes pdfbox to throw an error:
> > "This font does not permit embedding"
> > when attempting to process fonts that worked fine in pdfbox v2.0.20 and
> lower
>
>
>
> --
> This message was sent by Atlassian Jira
> (v8.3.4#803005)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: dev-help@pdfbox.apache.org
>
>

-- 
*Larry Lynn*
*Senior Software Engineer*
*Workiva Inc*.



*448 E. Main St, Bozeman, MT, 59715*