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
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

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: 8328
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: 8328
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 1 guest