Hi there.
Does any of you know how to get the current panel page entire html (styled and ready), in code. - With drupal_http_request i get a 403 forbidden. Is there any other way.
I need the html for rendering in the pdf_using_mpdf_api()-function.
Any ideas?
Comments
Comment #1
nikita petrov commentedHi, sbilde!
You can use the code below to get the html content of your panel:
After that you can generate pdf file by calling pdf_using_mpdf_api($html, $filename) function.
If you need to add some more css to style your pdf exactly like according node's page, you should apply my patch from here, and then implement hook in your module like this:
Comment #2
sbilde commentedThanks a lot for your reply Nikita. That is awesome! ..- I have a little hard time figuring out what the $panel_machine_name is? - Im trying to print a content type of 'Report' through as a Node view variant.
Can you point me in the right direction?
Comment #3
sbilde commentedNevermind, I found it: node_view
Once again thanks for your help!