0 Replies - 534 Views - Last Post: 16 October 2015 - 12:36 AM

#1 vishal kaushish  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 52
  • Joined: 09-March 15

How to append the pdf files that contains editable forms using perl

Posted 16 October 2015 - 12:36 AM

I want to add some contents in a pdf file using perl code.
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

Is This A Good Question/Topic? 0
  • +

Page 1 of 1