Jump to content

[SOLVED] Print Order dont work correctly [PDF problem/error]


Juan-Shunfa

Recommended Posts

Hello!

I have one error when i try to print a order from the backend, the process seems to work correctly but when i open the file , it show kinda bugged. (look file attached)

The invoice and the delivery document work fine, but not the orders.

What is the reason of this error? How can i repair it?

Prestashop versión 1.7.4.4

Thank you.

test.pdf

Edited by Juan-Shunfa (see edit history)
Link to comment
Share on other sites

Please i swear it is not a problem of the browser, i try with Mozilla, chrome, IE... and all do the same PDF bugged, so the problem should be solved in prestashop.

The browser just print the format PDF, but should be exist a code or file who help to generate the PDF and it is corrupted or something.

Check it , in IE the bug its more worse than other  browsers:

Thank you

Firefox.pdf

Chrome.pdf

IE.pdf

Link to comment
Share on other sites

42 minutes ago, tuk66 said:

OK. I meant your browser creates that output according to HTML and CSS of the page. As I know this issue with print styles is for years so don't expect a quick solution. 

Well, the browser print it... yes, but it doesnt the problem like u tell to me in last posts, i tried search for similars problem and i cant find anything like this, so maybe my solution its more quickly, but i dont know how to do it, or which file help to generate the pdf orders.

For example i found the view template for a order in "ADMINFOLDERxxxx"/themes/default/template/controllers/orders/helpers/view/view.tpl
And too the pdf generator in /classes/pdf/PDFGenerator.php

But i dont know where its the problem? maybe replace again these files in order to fix it? :S

Edited by Juan-Shunfa (see edit history)
Link to comment
Share on other sites

On 1/29/2019 at 1:18 PM, matyz said:

Hi i've got the same problem with printing orders. Did you found any solution ? 

Solution founded, replace these 2 files with the green line of code (+): https://github.com/PrestaShop/PrestaShop/pull/10135/files
 

On 1/24/2019 at 3:10 PM, tuk66 said:

OK. I meant your browser creates that output according to HTML and CSS of the page. As I know this issue with print styles is for years so don't expect a quick solution.

For me , replace 4 lines of code its a quick solution, buy your module isnt that.

Link to comment
Share on other sites

It worked!!! Thank you very much! 

I've got one more question - i need to enlarge font in table Products and remove "Refunded" column  - in wich files i need to look for that - theme.css - for font size and where is that table structure ?

 

Link to comment
Share on other sites

 

when they say it's your browser's theme, they mean that the print order button is just a shortcut to the famous CTRL + P, it's nothing like prestashop. it's not a function it's just a shortcut go to file> print or press CTRL + P do not touch code or anything, that will not change!

On 1/24/2019 at 10:59 AM, Juan-Shunfa said:

Please i swear it is not a problem of the browser, i try with Mozilla, chrome, IE... and all do the same PDF bugged, so the problem should be solved in prestashop.

The browser just print the format PDF, but should be exist a code or file who help to generate the PDF and it is corrupted or something.

Check it , in IE the bug its more worse than other  browsers:

Thank you

Firefox.pdf

Chrome.pdf

IE.pdf

ode or anything, that will not change!

Link to comment
Share on other sites

  • 7 months later...
  • 1 year later...

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...