[
https://issues.apache.org/jira/browse/PDFBOX-3233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-3233:
------------------------------------
Attachment: PDFBOX-3233.pdf
I attached the file and the code, so that it doesn't get lost.
{code}
File file = new File("....","PDFBOX-3233.pdf");
PDAcroForm acroForm =
PDDocument.load(file).getDocumentCatalog().getAcroForm();
Map<String, String> fieldValuesByName = new LinkedHashMap<>();
for (PDField f : acroForm.getFields())
{
fieldValuesByName.put(f.getFullyQualifiedName(),
f.getValueAsString());
}
for (PDField f : acroForm.getFields())
{
f.setValue(fieldValuesByName.get(f.getFullyQualifiedName()));
}
{code}
> Create default resources with cache
> -----------------------------------
>
> Key: PDFBOX-3233
> URL: https://issues.apache.org/jira/browse/PDFBOX-3233
> Project: PDFBox
> Issue Type: Wish
> Components: AcroForm
> Affects Versions: 2.0.0
> Reporter: Isto Nikula
> Priority: Minor
> Labels: newbie
> Attachments: PDFBOX-3233.pdf
>
>
> NOTE: actual version is 2.0.0-RC3
> In PDAcroForm#getDefaultResources existing resources are created like this:
> {code}
> COSDictionary dr = (COSDictionary)
> dictionary.getDictionaryObject(COSName.DR);
> if (dr != null)
> {
> retval = new PDResources(dr);
> }
> {code}
> PDResources supports resource cache but default resources is always created
> without one.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]