Re: [Damon] Create PDF and Reader Open Parameters
Damon,
Thanks for your suggestion but I’m more lost than ever.
As I mentioned in the first post in this thread, I can get the added parameters to set the opening style of the reader in the output_as_inline_pdf implementation by simply appending them to the createPDF call. The problem comes in with the url_as_inline_pdf code.
Based on your suggestion, I thought that I could create a field called pdf_parameters, use that in a variable ($addon, and append that variable to the url that’s created. The test value I used for pdf_parameters was #toolbar=1&navpanes=1&scrollbar=1&zoom=185, expecting that on success, the reader would open at 185% zoom.
I tried changing the original url_as_inline_pdf createPDF call:
<?php
$url = "http://www.elleschorrphotography.com/exhibitions3.php";
$data = createPDF_fromUrl($url);
createPDF_display('inline', $data, 'example.pdf');
?>
To this:
<?php
$url = "http://www.elleschorrphotography.com/exhibitions3.php"; ?>
<?php $addon = $common_informationRecord['pdf_parameters'] ;
$data = createPDF_fromUrl($url);
createPDF_display('inline',$data . $addon, 'example.pdf');
?>
That didn’t work, so also tried this:
<?php
$url = "http://www.elleschorrphotography.com/exhibitions3.php"; ?>
<?php $addon = $common_informationRecord['pdf_parameters'] ;
$data = createPDF_fromUrl($url);
createPDF_display('inline',$data, 'example.pdf . $addon');
?>
And this:
<?php
$url = "http://www.elleschorrphotography.com/exhibitions3.php"; ?>
<?php $addon = $common_informationRecord['pdf_parameters'] ;
$data = createPDF_fromUrl($url . $addon);
createPDF_display('inline',$data, 'example.pdf');
?>
Since in each case when the PDF was created the zoom was never set to 185, and I don’t know how to show the URL that’s actually being passed to the plugin, I’m lost as to how to proceed.
Any help would be appreciated.
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php