Jump to content

PDF file just opened with adobe


Traus

Recommended Posts

Hi all,

 

I am doing a module to create a PDF with all the orders delivered per month (Prestashop 1.5.4).

 

The script is in the following folder: modules/mymodule/controller/admin/Adminmymodule.php

 

and I use this code:

 

$pdf = new PDF($displayorders, PDF::TEMPLATE_ORDERS, $this->context->smarty);

 

$pdf->render();

 

 

It's everything ok, I can download the PDF file, but:

 

1. If the file is opened by an application different to Adobe, says "The file cannot be opened"

 

2. If the file is opened by Adobe application, I can see it perfectly, when I close the file, it’s prompted “Save as..” although I didn’t modified anything.

 

If I save the file with adobe, I can open it with any application.

 

 

 

It seems that the pdf is not created correctly although Adobe is smart enough to read it.

 

Anyone has the same problem?

 

 

Any help?

 

Thank you in advance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...