Jump to content

Recommended Posts

I am stuck in a very complex situation.

I am working on a PHP Web apps for Greeting card.

 

For this, I am using some Linux tools and TCPDF and FPDI.

Let me tell you how it all works:

 

 

there is 4 page greeting card template PDF file. this is custom size 5x7 inches 300dpi PDF file.

I have added custom size in TCPDF as well

 

case 'STANDARD_CARD'       : {$pf = array(1500.00,2100.00);break;}

 

what i do is, i use:

 

pdftk templateX.pdf burst output  page_%2d.pdf

 

to separate each page of temple.

 

now I use :

        $pdf = new FPDI($cardDetails['ORIENTATION'],"mm",$cardDetails['SIZE']);
        $size = $pdf->getPageSizeFromFormat($cardDetails['SIZE']);

        //set source file for 
        $pdf->setSourceFile($pdfFile);
        $templateIndex = $pdf->importPage(1);
        $pdf->AddPage($cardDetails['ORIENTATION'],$cardDetails['SIZE']);
        $pdf->useTemplate($templateIndex,0,0);

other things like, writing message printing images. and at the end save the file using:

        $pdf->output("file_name.pdf","F");

original PDF file: (5x7 inches)

http://www.mediafire.com/?bdinz9tqfemj0ft

 

now the output I am getting is not 5x7 pdf it is a 29 x 20 inches file and that destroying my calculation and PDF as well.

 

Please tell me what I am doing wrong...

 

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/241799-using-fpdi-and-tcpdf-together/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.