[
https://issues.apache.org/jira/browse/PDFBOX-4975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205416#comment-17205416
]
Richard edited comment on PDFBOX-4975 at 10/1/20, 10:57 AM:
------------------------------------------------------------
bq. Wouldn't it be better to check upfront using the PDFont classes if a
specific character is available? Or check with the fontbox based classes?
In my use-case it's not really possible because I may need to use multiple
fonts to render the text. Normally this could be worked around going character
by character and changing the font as needed per character, but the library
doesn't lend itself to that approach. The easiest solution by far would be to
pass a subclass of {{PDPageContentStream}}. At the moment I have it working by
replacing the {{PDPageContentStream}} class, but this may hinder future
upgrades.
was (Author: mealing):
bq. Wouldn't it be better to check upfront using the PDFont classes if a
specific character is available? Or check with the fontbox based classes?
In my use-case it's not really possible because I may need to use multiple
fonts to render the text. Normally this could be worked around going character
by character, but the library doesn't lend itself to that approach. The easiest
solution by far would be to pass a subclass of {{PDPageContentStream}}. At the
moment I have it working by replacing the {{PDPageContentStream}} class, but
this may hinder future upgrades.
> Make PDPageContentStream non-final
> -----------------------------------
>
> Key: PDFBOX-4975
> URL: https://issues.apache.org/jira/browse/PDFBOX-4975
> Project: PDFBox
> Issue Type: Wish
> Reporter: Richard
> Priority: Major
>
> Currently {{PDPageContentStream}} is final.
> There are some situations where it would be useful to define our own
> {{PDPageContentStream}}.
> For example, in my use-case I want to be able to try multiple fonts in case
> the characters in the text are not all in one font. The library I'm using
> accepts {{PDPageContentStream}} instances, so it would be much easier to pass
> a subclass of {{PDPageContentStream}} with the desired behavior rather than
> overhaul the library itself.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]