NAME

App::paperback - Copy and transform pages from a PDF into a new PDF

SYNOPSIS

 #!/usr/bin/env perl
 use strict;
 use App::paperback;
 my $inputFile              = "some-A6-pages.pdf";
 my $outputFile             = "new-A4-pages.pdf";
 my $desiredPage            = 1;
 my $newPositionXinPoints   = 100;
 my $newPositionYinPoints   = 150;
 my $rotate                 = 45;

 my ($num_Pages, $paper_Size) =
   App::paperback::openInputFile($inputFile);
 App::paperback::openOutputFile($outputFile);
 App::paperback::newPageInOutputFile();
 App::paperback::copyPageFromInputToOutput( {
     page   => $desiredPage,
     rotate => $rotate,
     x      => $newPositionXinPoints,
     y      => $newPositionYinPoints
 } );
 App::paperback::closeInputFile();
 App::paperback::closeOutputFile();

DESCRIPTION

This module allows you to transform pages from an input PDF file into a new PDF file. Input PDF should:

1. Conform to version 1.4 of PDF;

2. Not be encrypted;

3. Consist of vertical-oriented pages of the same size;

4. Use one of these page sizes: A4, A5, A6, Half Letter, Quarter Letter, Half Legal, Quarter Legal or Letter.