felek Posted February 2, 2015 Share Posted February 2, 2015 Hello, 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 More sharing options...
tuk66 Posted February 4, 2015 Share Posted February 4, 2015 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()) ob_clean(); flush(); echo "Your PDF content"; Link to comment Share on other sites More sharing options...
felek Posted February 5, 2015 Author Share Posted February 5, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now