OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



HTML to pdf-Plugin

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

HTML to pdf-Plugin

Postby cabotine » Fri Jan 10, 2014 5:46 am

Hi,
is there a plugin to create pdfs from HTML? This would be lovely because people keep asking for pdfs and I dont have any ressources to create them myself.
Thank you
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: HTML to pdf-Plugin

Postby asmecher » Fri Jan 10, 2014 6:23 am

Hi Frank,

No, as far as I'm aware nobody has written an HTML to PDF plugin yet.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: HTML to pdf-Plugin

Postby cabotine » Sat Jan 11, 2014 7:32 am

Hi Alec,
I am thinking about including TCPDF to create pdf from the html-files.
Now there are some options/questions...
1. Include the php from TCPDF into the smarty-template
- what would be the right way? {php} should be no longer used I read somewhere...
- it takes longer if it is creating the pdf on demand...

2. setup a seperate php-skript that generates the pdfs once a day (by a cronjob)
- would be faster
- direct access to the database to get the information on authors and stuff would be necessary...

What would you think?
Best
Frank J.
cabotine
 
Posts: 39
Joined: Tue Feb 19, 2008 1:25 pm

Re: HTML to pdf-Plugin

Postby asmecher » Mon Jan 13, 2014 7:23 am

Hi Frank,

The Smarty templates are the wrong place to do this. I would suggest writing a plugin (see the OJS technical reference) that intercepts HTML uploads by the Editor, and when one happens, also generates a PDF. This would be entirely done in PHP. Since it's triggered by an HTML upload, there's no need to use cron or something similar.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 0 guests