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

Aaron Eischeid commented on PDFBOX-2970:
----------------------------------------

I needed the flatten method recently as pdf.js in Firefox was not rendering 
content of a pdf with fields filled in.

The documented method didn't work for me the form is gone so it stops 
complaining, but the content I want to be present is missing. However, I found 
the undocumented one that flatten() calls is perfect for me. refreshAppearences 
seems to be a bit odd in that fonts get a little cut off or moved slightly, 
also empty fields which I used as placholders for placing images get a couple 
odd glyphs inserted, but overall pretty close.

also I already had the fields so makes sense to pass them in rather than have 
flatten look them up again for me. 

in short I think this method should be documented in the public docs.

public void flatten(List<PDField> fields, boolean refreshAppearances)



> Add capability to flatten AcroForm form fields
> ----------------------------------------------
>
>                 Key: PDFBOX-2970
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2970
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: AcroForm
>    Affects Versions: 1.8.10, 2.0.0
>            Reporter: Maruan Sahyoun
>            Assignee: Maruan Sahyoun
>         Attachments: AcroFormsBasicFields-filled.pdf, 
> AcroFormsBasicFields.Acrobat.Flattened.pdf, 
> AlignmentTests-filled.flattened.pdfbox.pdf, AlignmentTests-filled.pdf, 
> AlignmentTests.Acrobat.Flattened.pdf
>
>
> There should be a capability to flatten AcroForm form fields. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to