Hi,
Is it possible to generate PDF output on demand?
Currently we have two targets for each document: HTML5 and PDF. PDF formatting/styles along with issues I've run into seem to be more involved than HTML. I'm still a novice but on occasion I spend a lot of time trying to resolve PDF style issues.
So I was thinking within the HTML to include a "Generate PDF" link or button that would start the process, create the PDF and display it to the user for viewing or download. I'm sure it would be possible because there are several PDF generation libraries out there -- iText, for example. The big problem would be reading all the style information and applying it to make the PDF similar to HTML.
Thanks!
Steve
Generate PDF On Demand?
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Generate PDF On Demand?
Perhaps the biggest adjustment for me using Flare was, and sometimes still is, the whole Medium concept. But once you get the hang of it, setting styles for different outputs is just part of the job. I don't know your audience, but I don't think that would fly with mine.
However, since my office has an online PDF printer, I always put a Print button in my HTML outputs. Would something like that work for you? I think you're still going to have styling issues going from web (which is generally viewed in landscape) to PDF (portrait).
However, since my office has an online PDF printer, I always put a Print button in my HTML outputs. Would something like that work for you? I think you're still going to have styling issues going from web (which is generally viewed in landscape) to PDF (portrait).
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
Re: Generate PDF On Demand?
Thanks, kwag_myers.
Could you tell me a little more about that Print button? What processes get triggered when you click it?
Thank you!
Could you tell me a little more about that Print button? What processes get triggered when you click it?
Thank you!
-
kwag_myers
- Propellus Maximus
- Posts: 810
- Joined: Wed Jul 25, 2012 11:36 am
- Location: Ann Arbor, MI
Re: Generate PDF On Demand?
The Print action is a standard element of the tri-pane skin toolbar and [url+http://webhelp.madcapsoftware.com/flare ... _Proxy.htm]topic toolbar proxy[/url]. Some other skins also include the Print feature, which you can search for on Flare's Online Help.
The function is pretty generic. We the user clicks the button the standard Print dialog displays for the user's default printer. They would need to select a PDF printer from that dialog. You might be able to find a JavaScript that does it for them, like this one (maybe).
The function is pretty generic. We the user clicks the button the standard Print dialog displays for the user's default printer. They would need to select a PDF printer from that dialog. You might be able to find a JavaScript that does it for them, like this one (maybe).
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Generate PDF On Demand?
Steve,
You're not going to get the whole project built like you would from Flare, if you use a print button in the skin. I assume you are wanting a PDF of the whole project, not just the topic that is open, right?
Why does it need to be dynamically generated? Can't you create a PDF build as a target, and then output that to a static location? Then you can put a button in the webhelp that points to that PDF file. Since the file is being generated every time the online help is being generated, it is as updated as the online help.
Does that make sense?
You're not going to get the whole project built like you would from Flare, if you use a print button in the skin. I assume you are wanting a PDF of the whole project, not just the topic that is open, right?
Why does it need to be dynamically generated? Can't you create a PDF build as a target, and then output that to a static location? Then you can put a button in the webhelp that points to that PDF file. Since the file is being generated every time the online help is being generated, it is as updated as the online help.
Does that make sense?
Re: Generate PDF On Demand?
Hi Paul,
I was still in the thinking phase. I was thinking definitely of generating a PDF for a document. Also possibly for a single topic -- the topic that a user is currently reading. I'm not sure there would be a need for printing the entire project.
I actually was not aware that a print button is available. (Thanks kwag for pointing that out.)
We do indeed have PDF targets for all our documents and the process of publishing them and linking to them (upon first publication) from the HTML adds extra steps and time to the overall publication process. Publishing updated PDFs adds a couple of steps too according to the process that we adopted. That's why I started wondering about generating PDFs on demand -- it's all about streamlining processes.
I'll have to do additional thinking and consult with others on my team about all this.
If you have any additional comments, please let me know.
Thanks again, Paul and kwag.
I was still in the thinking phase. I was thinking definitely of generating a PDF for a document. Also possibly for a single topic -- the topic that a user is currently reading. I'm not sure there would be a need for printing the entire project.
I actually was not aware that a print button is available. (Thanks kwag for pointing that out.)
We do indeed have PDF targets for all our documents and the process of publishing them and linking to them (upon first publication) from the HTML adds extra steps and time to the overall publication process. Publishing updated PDFs adds a couple of steps too according to the process that we adopted. That's why I started wondering about generating PDFs on demand -- it's all about streamlining processes.
I'll have to do additional thinking and consult with others on my team about all this.
If you have any additional comments, please let me know.
Thanks again, Paul and kwag.
Re: Generate PDF On Demand?
It looks like the best idea is to continue generating the PDFs and linking to them, rather than go with the generate on demand. Thanks again, Paul and kwag!
Steve
Steve
-
doc_guy
- Propellus Maximus
- Posts: 1979
- Joined: Tue Nov 28, 2006 11:18 am
- Location: Crossroads of the West
- Contact:
Re: Generate PDF On Demand?
Just remember that you can use External Resources to map in the published PDFs into the online help. Then you can use bulk targets to generate multiple targets in sequence.
So in this case, you'd (one time) set up the external resource to sync in the published PDF into the online help project, then you'd (one time) create a bulk target that builds the PDF files first, and builds the web version last.
After that one-time setup, you'd just build your bulk target and it would automatically import the completed PDF files into the web version, and publishes those to the correct location.
So in this case, you'd (one time) set up the external resource to sync in the published PDF into the online help project, then you'd (one time) create a bulk target that builds the PDF files first, and builds the web version last.
After that one-time setup, you'd just build your bulk target and it would automatically import the completed PDF files into the web version, and publishes those to the correct location.
Re: Generate PDF On Demand?
Thanks, Paul. I'll revisit our process and see if we can align it with what you suggested.
Cheers,
Steve
Cheers,
Steve
