How can I merge PDF files with Perl?

前端 未结 3 421
予麋鹿
予麋鹿 2021-01-17 22:58

Using Perl, how can I combine or merge the sample PDF files into a single PDF file?

3条回答
  •  半阙折子戏
    2021-01-17 23:51

    CAM::PDF can do this quite easily, and has a simple command-line front end to help. Note: I'm the author of that library. Example:

    appendpdf.pl file1.pdf file2.pdf outfile.pdf
    

    From the SYNOPSIS section of the perldoc:

    my $anotherpdf = CAM::PDF->new('test2.pdf');
    $pdf->appendPDF($anotherpdf);
    

提交回复
热议问题