Created
November 11, 2012 11:29
-
-
Save ichigotake/4054634 to your computer and use it in GitHub Desktop.
CAM::PDFを利用して複数のPDFを結合するスクリプトサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# CAM::PDF - search.cpan.org | |
# http://search.cpan.org/~cdolan/CAM-PDF-1.58/lib/CAM/PDF.pm | |
use strict; | |
use warnings; | |
use CAM::PDF; | |
# 結合するPDFのファイル名を指定してインスタンス生成 | |
my $pdf1 = CAM::PDF->new('1.pdf'); | |
my $pdf2 = CAM::PDF->new('2.pdf'); | |
# $pdf1の後ろに$pdf2を結合 | |
$pdf1->appendPDF($pdf2); | |
# 結合したPDFを出力するファイル名を指定 | |
$pdf1->cleanoutput('out.pdf'); | |
# 結合したPDFを出力 | |
$pdf1->toPDF(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment