Jump to content

generate own pdf from binary data inside of module


Recommended Posts


I want to generate pdf document inside of module.

I have my own class that takes data from other server and returns it to me.

I have data as binary. In my test file when i send headers and print_r it works fine.

But when i'm in my module file i can't send headers is there any way to solve this ?

 see that prestashop has tcpd class to solve pdf generation but how can I use it inside my module for binary data with i have ?

Link to comment
Share on other sites

I think you can send headers. Not tested, but try somewthing like:

@ini_set('display_errors', 'off');
header('Content-Type: application/pdf');
... other headers
if (ob_get_contents())
echo "Your PDF content";
Link to comment
Share on other sites

Thx for replay I did some think similar before print_r i did some think like ob_end_clean - not sure that but similar i clear headers and now it works fine.

Any way is there any way to change posytion of my custom form ?inside of admin order now is at top of current order can I move some how ?

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