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)

By Dave - June 29, 2010

Hello All,

We've just released a new plugin: Create PDF
http://www.interactivetools.com/add-ons/detail.php?Create-PDF-1017

This one is really cool. It's a collection of very simple developer functions that you can use to automatically create PDF files from existing web pages, html code, or from any url.

You can display PDFs 2 different ways:
- Inline: displayed in the browser window
- Attachment: send as a download to the browser to be locally saved

Providing your content in PDFs is great for:
- Printer-friendly "info" sheets for your visitors
- Making it easy for a user to download and save your page to their computer for reference
- Creating PDF invoices and reports, or emailing content as PDF files
- And much more...

We've used this plugin (and earlier versions) on over a half dozen sites already. It requires some server libraries that are on many servers, but not all. There's a link "Test Server Requirements" you can click on install to test. So if you have any troubles email me and I'll help you and your host get it sorted out.

Let me know any questions.
Dave Edis - Senior Developer
interactivetools.com

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: [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