pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "simon steiner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4303) Helv and ZaDb overridden
Date Thu, 30 Aug 2018 13:50:00 GMT

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

simon steiner commented on PDFBOX-4303:
---------------------------------------

PDDocument sourceDoc = PDDocument.load({color:#000080}new {color}File({color:#008000}"ReaderModifiedForm.pdf"{color}));
PDDocumentCatalog srcCatalog = sourceDoc.getDocumentCatalog();
PDAcroForm srcAcroForm = srcCatalog.getAcroForm();
COSDictionary dr = (COSDictionary) srcAcroForm.getCOSObject().getDictionaryObject(COSName.{color:#660e7a}DR{color});
COSDictionary font = (COSDictionary) dr.getDictionaryObject(COSName.{color:#660e7a}FONT{color});
COSDictionary helv = (COSDictionary) font.getDictionaryObject(COSName.getPDFName({color:#008000}"Helv"{color}));
Assert.assertNotNull(helv.getDictionaryObject(COSName.{color:#660e7a}NAME{color}));
sourceDoc.close();

> Helv and ZaDb overridden
> ------------------------
>
>                 Key: PDFBOX-4303
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4303
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.11
>            Reporter: simon steiner
>            Assignee: Maruan Sahyoun
>            Priority: Major
>              Labels: Appearance
>         Attachments: ReaderModifiedForm.pdf
>
>
> Due to change:
> PDFBOX-3943: create /Helv and /ZaDb entries if they don't exist, regardless if /DR existed
or not
>  
> was working ok in 2.0.7, in 2.0 branch
> PDAcroForm
> verifyOrCreateDefaults():
> is:
> {color:#000080}if {color}(!defaultResources.getCOSObject().containsKey({color:#008000}"Helv"{color}))
> should be checking key in the font dictionary before calling defaultResources.put



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message