createPDF
11 posts by 4 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: September 6, 2010 (RSS)
By Toledoh - August 30, 2010
The createPDF seems to be working... mostly.
The test files are creating the PDF, however for everything other than the "url_as..." the displayed result is a PDF of my 404 error page.
Any ideas?
Tim (toledoh.com.au)
Re: [Toledoh] createPDF
By Jason - August 31, 2010
What is the url that you're passing to the plugin? Check to make sure that's correct first.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] createPDF
By Toledoh - August 31, 2010
Just the standard test files, such as:
http://www.murraysbrewingco.com.au/cmsAdmin/plugins/createPDF/tests/html_as_inline.php, and
http://www.murraysbrewingco.com.au/cmsAdmin/plugins/createPDF/tests/output_as_inline_pdf.php
The only one that works is the URL version;http://www.murraysbrewingco.com.au/cmsAdmin/plugins/createPDF/tests/url_as_inline.php
An example file is attached.
Tim (toledoh.com.au)
Re: [Toledoh] createPDF
By Jason - August 31, 2010
Could you also attach url_as_inline.php so I can see how they're different?
You can also try adding this code to the very top of html_as_inline.php:
<?php require_once "../../../lib/viewer_functions.php"; ?>
Give that a try.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] createPDF
By Toledoh - August 31, 2010
I had deleted that line just to see if that was the issue...
Attached are the url versions.
Tim (toledoh.com.au)
Re: [Toledoh] createPDF
By Toledoh - August 31, 2010
Tim (toledoh.com.au)
Re: [Toledoh] createPDF
By Jason - September 1, 2010
I've take a look and haven't been able to find a problem. The plugin works correctly as it does create a pdf. It doesn't seem to produce any errors and all of the tests show that the server does support the plugin.
Before doing the conversion to pdf, the plugin writes the output to a temporary html file. Do you have any .htaccess redirects that affect how .html files are displayed? It is possible that this redirect is what's redirecting to your 404 page.
Let me know. If not, I'll look into this further.
Thanks.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] createPDF
By Chris - September 1, 2010 - edited: September 1, 2010
Wow, this was a tricky one! :)
Your server is configured in a funny way, which is preventing the Create PDF plugin from functioning. When a script on your server makes a web request on http://www.murraysbrewingco.com.au/, it ends up going someplace completely different!
When you ask the internet what the IP address of www.murraysbrewingco.com.au is, you'll be told it's [url http://www.iptools.com/dnstools.php?tool=hostresolve&user_data=www.murraysbrewingco.com.au&submit=Go]116.213.5.16[/url]. However, when you ask the web server running on www.murraysbrewingco.com.au what the IP address of www.murraysbrewingco.com.au is, you'll be told it's [url http://www.murraysbrewingco.com.au/ip_test.php]203.30.164.196[/url]!
I've uploaded a simple script to show the problem:
[url http://www.murraysbrewingco.com.au/web_get_test.php]http://www.murraysbrewingco.com.au/web_get_test.php[/url]
The script attempts to download http://www.murraysbrewingco.com.au/web_get_test_target.php, which is a file that simply reads "IT WORKS". On your server, the test shows nothing.
(Another clue is that the PDF generated by the [url http://www.murraysbrewingco.com.au/cmsAdmin/plugins/createPDF/tests/html_as_inline.php]html_as_inline test[/url] is a different error page ("Woops!") than the [url http://www.murraysbrewingco.com.au/x]error page[/url] you get from 404s on www.murraysbrewingco.com.au ("Error occurred") from a web browser.)
Please ask your web host to fix your server so that it can make web requests of itself. If you show them the web_get_test.php script above, they should be able to figure it out.
I hope this helps! Please let me know if you have any questions.
Chris
Re: [chris] createPDF
By Toledoh - September 2, 2010
Tim (toledoh.com.au)
Re: [Toledoh] createPDF
By Toledoh - September 6, 2010
Works a treat now.
Tim (toledoh.com.au)