I have 2 pdf files:
1 pdf file contains plain text
2nd pdf file contains forms
Below mentioned code easily add the new page with some text in pdf file contains plain text
But when run the same on pdf file with forms, it shows below error:
The PDF file uses a cross-reference stream, which is not yet supported (see Know
n Issues in the PDF::API2 documentation) at C:\Perl\lib/PDF/API2/Basic/PDF/File.
pm line 1048.
use strict; use warnings; use PDF::API2; my $pdf = PDF::API2->open('file.pdf'); # Add a blank page my $page = $pdf->page(); # Add some text to the page my $text = $page->text(); my $font = $pdf->corefont('Helvetica-Bold'); $text->font($font, 20); $text->translate(200, 700); $text->text('add some text'); $pdf->saveas('file.pdf');
Could any body please provide some solution how to edit the pdf that have editable forms