[
https://issues.apache.org/jira/browse/PDFBOX-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14900721#comment-14900721
]
Johannes Barre commented on PDFBOX-2980:
----------------------------------------
We use PDFs with form fields as templates and fill them automatically. For page
numbering we have an form field called {{page_num}} and one called
{{page_total}} on every page. {{page_total}} obviously needs the same value for
every page, but {{page_num}} needs to be filled with individual pages. The
advantage: Position & style of the page number can be set via the template PDF.
Previously, we were splitting every page in a separate PDF and then filling
them and then merging them back together (all steps with pdftk). But when I
split the PDFs using PDFBox, there is no form in the resulting pdfs (I tried
both the {{PageExtractor}} and creating a new PDF and add the page with
{{addPage}}). And if possible I'd like to split & remerge the PDF in the first
place.
It doesn't look like PDFBox is using Semantic Versioning, since it changed an
API in a dot release...
> PDField.getKids doesn't return PDFields since 1.8.9
> ---------------------------------------------------
>
> Key: PDFBOX-2980
> URL: https://issues.apache.org/jira/browse/PDFBOX-2980
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 1.8.9, 1.8.10
> Environment: $ cat /proc/version
> Linux version 3.19.0-28-generic (buildd@lgw01-03) (gcc version 4.9.2 (Ubuntu
> 4.9.2-10ubuntu13) ) #30-Ubuntu SMP Mon Aug 31 15:52:51 UTC 2015
> $ java -version
> java version "1.7.0_79"
> OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.15.04.1)
> OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
> Reporter: Johannes Barre
> Attachments: Field.java
>
>
> For my current task I need to access several form fields with the same name.
> I found [PDFBOX-2148], which seemed to be exactly what I need. However, when
> I tried the code and pdf of that bug with Pdfbox 1.8.10, I got no output,
> because {{getKids}} returned {{PDAnnotationWidget}} s instead of {{PDField}}
> s, even when I tried the provided code. So I tried with 1.8.5 (reported
> version) and I got this output:
> {noformat}
> Button2.null
> Button2.null
> Button2.null
> Button2.null
> {noformat}
> With 1.8.8 I've got:
> {noformat}
> Button2
> Button2
> Button2
> Button2
> {noformat}
> And with 1.8.9 and 1.8.10 I got no output at all.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]