This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Only some viewers can open resulting pdfs

jcrandall99 wrote on 2014-06-23:
Hi--

When using the api the resulting pdf does not open with Adobe reader or the reader in Chrome (more importantly my client can't open them :o). Firefox has no problem, nor does the viewer on my Ubuntu box. My guess is that something is get screwed up by the convoluted way I am producing the page. The online conversion sort of works--the sizing is funky.

My test page: www.jcgmo.com/acme/generic-bar . This is a Joomla site using Chronoforms to create the form that accepts inputs that are passed to RGraph javascript library. Maybe I need to simplify the output?

Thanks,
Jim
support wrote on 2014-06-24:
Hello Jim,

The "graph-try.pdf" file is actually a mix of HTML code and PDF data. You have to ensure that your application returns only PDF data retrieved from the API. In this case it looks like Joomla wrapped PDF data in some HTML template. You can easily check it yourself - just rename the .pdf file to graph-try.html and open it in the browser.
jcrandall99 wrote on 2014-06-24:
Oh, the tangled webs we weave. Thanks. I hadn't thought through how the 'echo $pdf;' line in my code was invoking the template. I fixed it by downloading the pdf file to the server. Cool.

Thanks,
Jim