You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "João da Nóbrega (JIRA)" <ji...@apache.org> on 2016/06/20 15:05:05 UTC
[jira] [Comment Edited] (PDFBOX-3387) AcroFrom fields (values)
invisible when printing
[ https://issues.apache.org/jira/browse/PDFBOX-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339658#comment-15339658 ]
João da Nóbrega edited comment on PDFBOX-3387 at 6/20/16 3:04 PM:
------------------------------------------------------------------
Hi Maruan,
Are you sure this is the case? Unless we are using the wrong PDAnnotationWidget, the following code has the same problem (not printing the fields). Also, it seems the isPrinted flag is already on. Our program outputs the following:
Field: Fully Qualified Name:NAME1
Annotation Flags:4
Annotation isPrinted:true
Substitution found for field [NAME1]
[...]
{code:Java}
java.util.List<PDField> allFields = acroForm.getFields();
for (PDField oneField : allFields) {
System.out.format("Field: Fully Qualified Name:%s\n", oneField.getFullyQualifiedName());
List<PDAnnotationWidget> widgets = oneField.getWidgets();
for(PDAnnotationWidget widget : widgets)
{
System.out.format(" Annotation Flags:%d\n", widget.getAnnotationFlags());
System.out.format(" Annotation isPrinted:%s\n", widget.isPrinted());
widget.setPrinted(true);
}
{code}
was (Author: danobrega@gmail.com):
Hi Maruan,
Are you sure this is the case? Unless we are using the wrong PDAnnotationWidget, the following code has the same problem (not printing the fields). Also, it seems the isPrinted flag is already on. Our program outputs the following:
Field: Fully Qualified Name:NAME1
Annotation Flags:4
Annotation isPrinted:true
Substitution found for field [NAME1]
[...]
java.util.List<PDField> allFields = acroForm.getFields();
for (PDField oneField : allFields) {
System.out.format("Field: Fully Qualified Name:%s\n", oneField.getFullyQualifiedName());
List<PDAnnotationWidget> widgets = oneField.getWidgets();
for(PDAnnotationWidget widget : widgets)
{
System.out.format(" Annotation Flags:%d\n", widget.getAnnotationFlags());
System.out.format(" Annotation isPrinted:%s\n", widget.isPrinted());
widget.setPrinted(true);
}
> AcroFrom fields (values) invisible when printing
> ------------------------------------------------
>
> Key: PDFBOX-3387
> URL: https://issues.apache.org/jira/browse/PDFBOX-3387
> Project: PDFBox
> Issue Type: Improvement
> Components: AcroForm
> Affects Versions: 2.0.2
> Reporter: kazu
> Assignee: Maruan Sahyoun
> Fix For: 2.0.3, 2.1.0
>
>
> AcrobatReader/FoxitReader/... won't print values of e.g. AcroForm TextFields within a PDF created with PDFBox. Neither the print-preview shows the values within the fields, nor does the printed result.
> Minimal example to reproduce:
> the one provided within the repository:
> https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateSimpleForm.java
> Also had this issue with 1.8.x versions but maybe my code just wasn't correct..
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org