[
https://issues.apache.org/jira/browse/PDFBOX-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14102378#comment-14102378
]
John Hewson commented on PDFBOX-2144:
-------------------------------------
I think you'll just have to make sure that you don't change the configuration
while pages are rendering. Allow all active documents to complete rendering
before making changes, and queue up new requests. I'd try to suggest something
more sophisticated but I don't think it'll play nice with PDFBox's internal
static state (which is _everywhere_), plus we can't couple ExternalFonts to
PDFRenderer and/or PageDrawer as it's needed for non-rendering purposes, I
guess we _could_ couple it to a PDDocument but we'd have an initialisation
problem as FileSystemFontProvider has a heaveyweight constructor, so there'd
have to be some sort of transactional system around providing FontProvider
instances to new documents, etc.... we don't want to go there.
> Provide a pluggable font manager
> --------------------------------
>
> Key: PDFBOX-2144
> URL: https://issues.apache.org/jira/browse/PDFBOX-2144
> Project: PDFBox
> Issue Type: Improvement
> Components: Rendering
> Reporter: Petr Slaby
> Attachments: FontManager.patch
>
>
> Our J2EE application has all fonts and resources configured and stored in its
> database. No files are accessed directly from file system or from system
> environment. To make PDFBox compatible with this philosophy, we need the
> FontManager in pdfbox and fontbox to be pluggable, e.g. as shown in the
> attached patch.
> The proposal defines a FontManager interface and default implementation which
> is the original one. FontManager then needs to be configured on and
> propagated from PDFStreamEngine and PageDrawer. It should also be
> configurable on PDFRenderer, which is not shown in the patch. There I would
> suggest to introduce a configuration object which would take care about all
> the current and future options of PDFRenderer.
--
This message was sent by Atlassian JIRA
(v6.2#6252)