pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PDFBOX-4545) PdfRenderer fails to render subsetted font
Date Tue, 13 Aug 2019 03:42:00 GMT

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

Tilman Hausherr edited comment on PDFBOX-4545 at 8/13/19 3:41 AM:
------------------------------------------------------------------

I intend to close this as "won't do". I wanted to do this yesterday but slept over this. Your
use case is valid, but IMHO the optimization is more important for people who create a large
amount of PDF files, e.g. for an tailored mass mailing.

What happened when you tried to render an unsaved PDF? I made a test and it worked, although
there were warnings.


was (Author: tilman):
I intend to close this as "won't do. I wanted to do this yesterday but slept over this. Your
use case is valid, but IMHO the optimization is more important for people who create a large
amount of PDF files, e.g. for an tailored mass mailing.

What happened when you tried to render an unsaved PDF? I made a test and it worked, although
there were warnings.

> PdfRenderer fails to render subsetted font
> ------------------------------------------
>
>                 Key: PDFBOX-4545
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4545
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel, Rendering
>    Affects Versions: 2.0.15
>            Reporter: Jason Kantz
>            Priority: Minor
>         Attachments: embedder.patch
>
>
> In 2.0.3, TrueTypeEmbedder initializes FONT_FILE2 with the full font (1) and then writes
the subset later on save (2) (3).
> In 2.0.15 TrueTypeEmbedder now only initializes FONT_FILE2 if !embeddedSubset (4).
> This results in PDFRenderer failing to find and use the intended font when using a PDDocument
that has never been saved.
> Attached patch restores the original behavior to work around the issue.
> (1) https://apache.googlesource.com/pdfbox/+/refs/tags/2.0.3/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java#82
> (2) https://apache.googlesource.com/pdfbox/+/refs/tags/2.0.3/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java#1128
> (3) https://apache.googlesource.com/pdfbox/+/refs/tags/2.0.3/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java#100
> (4) [https://apache.googlesource.com/pdfbox/+/refs/tags/2.0.15/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/TrueTypeEmbedder.java#77]
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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


Mime
View raw message