use strict; use CAM::PDF; use Data::Printer; my $doc1 = 'Document1.PDF'; my $draw1 = 'Drawing1.PDF'; my $newdoc1 = 'NewDocument1.PDF'; print "open the original document \n"; my $pdf1 = CAM::PDF->new($doc1); my @prefs = $pdf1->getPrefs(); p (@prefs); print "save it to the new location \n"; $pdf1->output($newdoc1); print "open the new document \n"; $pdf1 = CAM::PDF->new($newdoc1); print "open a drawing \n"; my $pdf2 = CAM::PDF->new($draw1); print "append the drawing to the new document \n"; $pdf1->appendPDF($pdf2); print "save the appended document \n"; $pdf1->output($newdoc1); print "Done \n"