Create PDF v1.00 Released! (New Plugin)

17 posts by 4 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: July 8, 2010   (RSS)

Re: [Dave] Create PDF v1.00 Released! (New Plugin)

By aev - June 30, 2010

Hi Dave,

can we make multipage PDF's with this plugin? Is there a "newpage" command/marker we can put in our html to control this?

Can we make exact page sizes? Like 210mm x 297mm (A4).

-aev-

Re: [aev] Create PDF v1.00 Released! (New Plugin)

By flamerz - June 30, 2010

hi dave!

just installed, and cant visualize the pdf.

can you give me some point to fix this?

my developer installation is a win xp with apache/mysql.
Attachments:

nopdf.jpg 64K

Re: [flamerz] Create PDF v1.00 Released! (New Plugin)

By Djulia - June 30, 2010

Hello,

I had the same problem.

I had not put the examples folder in the folder plugin. I placed it in createPDF folder (plugin/createPDF/examples) and that corrects the problem.

Djulia

Re: [Djulia] Create PDF v1.00 Released! (New Plugin)

By flamerz - June 30, 2010 - edited: June 30, 2010

Thanks Djulia! [:)]

now seems to work fine.. but i get a notice:

File: C:/Archivos de programa/NuSphere/TechPlat/apache/htdocs/cbeta/cmsAdmin/plugins/examples/output_as_inline_pdf.php
Warning: file_get_contents(C:/Archivos de programa/NuSphere/TechPlat/apache/htdocs/cbeta/cmsAdmin/plugins/examples/output_as_inline_pdf.php): failed to open stream: No such file or directory in C:\Archivos de programa\NuSphere\TechPlat\apache\htdocs\cbeta\cmsAdmin\plugins\createPDF.php on line 488

in my plugins folder i created a "createPDF" folder with the examples.

i dont know if i have to set some path.

Re: [flamerz] Create PDF v1.00 Released! (New Plugin)

By flamerz - June 30, 2010

I think the function file_get_contents is not getting a valid path parameter in windows (maybe problem with / and \ ).

Re: [aev] Create PDF v1.00 Released! (New Plugin)

By Dave - June 30, 2010

Hi aev,

How it works is it's a really nice easy to use interface (API wrapper) around an open source conversion tool called wkhtmltopdf. And what wkhtmltopdf does is use Apple's webkit rendering engine (which powers Safari and Chrome) to render the page and then save it as PDF.

So you can create page-breaks the same way you would for a printer page using CSS like this:
<div style="page-break-after:always"></div>

I think the default page size is A4. And we can add a option to the plugin to specify a default page size (A4 or Letter) if needed for the next version of the plugin (1.01). Although how the HTML maps to that will likely affected by a number of factors.

Hope that helps! Let me know any other questions.
Dave Edis - Senior Developer
interactivetools.com

Re: [flamerz] Create PDF v1.00 Released! (New Plugin)

By Dave - June 30, 2010

Hi flamerz,

Does this file exist?
C:\Archivos de programa\NuSphere\TechPlat\apache\htdocs\cbeta\cmsAdmin\plugins\examples\output_as_inline_pdf.php

If not, make sure you copy that file to that path.

If it does exist, or there are more issues, email me CMS and FTP login details to dave@interactivetools.com and I can take a look. Email, don't post login details to the forum.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Create PDF v1.00 Released! (New Plugin)

By flamerz - July 1, 2010

Hi Dave, i to get the correct path i have to duplicate the examples folder.

But i think this should be fixed in:

$exampleUrl = "plugins/createPDF/examples/$exampleFile";
$examplePath = dirname(__FILE__) . "/createPDF/examples/$exampleFile";

(line 448 missed the "/createPDF" in the path)

One was pointing to:
xxxx/plugins/createPDF/examples
and another
xxxx/plugins/examples

Is this ok?

Re: [flamerz] Create PDF v1.00 Released! (New Plugin)

By Dave - July 1, 2010

Hi flamerz,

That should be fine. Where is the createPDF.php file? Is it in /plugins/ or /plugins/createPDF/?

It's setup to assume it's in /plugins/createPDF/createPDF.php
Dave Edis - Senior Developer
interactivetools.com