windows - Merge PDF with PDF::API2 under Perl and keeping the bookmarks -


i able utilize perl library pdf::api2 merge several pdfs according following code provided here: how use pdf::api2 merge several pdfs 1 perl?.

#!/usr/bin/perl use strict; use warnings;  use pdf::api2;  # files merge @input_files = (     'document1.pdf',     'document2.pdf',     'document3.pdf', ); $output_file = 'new.pdf';  # output file $output_pdf = pdf::api2->new(-file => $output_file);  foreach $input_file (@input_files) {     $input_pdf = pdf::api2->open($input_file);     @numpages = (1..$input_pdf->pages());     foreach $numpage (@numpages) {         # add page number $numpage $input_file end of          # file $output_file         $output_pdf->importpage($input_pdf,$numpage,0);             } }  $output_pdf->save(); 

but unfortunately bookmarks have been erased.

does know solution using pdf::api2?


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -