Re: PDF Generation Utilities

  • From: Q <q@xxxxxxxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Mon, 01 Aug 2011 23:26:08 -0400

The Django web framework has everything you need to generate PDF views from your models. You can, for instance, take a paginated news article and render it as a single pdf. This is only for data which originates from within the website though and not generic html files.


On 8/1/2011 10:49 PM, Don Marang wrote:
I am not sure how you plan to send the request to the Linux server or how to specify more than one web page. What language are you planning to make this request? Is it for a specific site or a general utility?

In the Ubuntu repository, there is a command line utility to manipulate and build pdf files. The command and package name are pdftk.

To install, type:
sudo apt-get update
sudo apt-get install pdftk

Reading the man page will give you some information:

man pdftk

I imagine you could transfer the file from the web site to the server at the beginning of the script using wget, strip out the unwanted links at the as desired (or convert them to bookmarks), and build the pdf file. I do not know whether it would be easier to send the file back to the browser computer or just notify when processing is complete. Then it can present a Save As dialog and download the file from the server.

There are probably many approaches to this problem, this is how I would approach it.

*Don Marang*
Vinux Software Development Coordinator - vinuxproject.org <http://www.vinuxproject.org/> There is just so much stuff in the world that, to me, is devoid of any real substance, value, and content that I just try to make sure that I am working on things that matter.
-- Dean Kamen

On 7/29/2011 9:53 AM, Homme, James wrote:

Hi,

Here is what I'd like to do.

·Send an accessible HTML file to a server that has a utility running on it that would then spit back a PDF document that I can print. The utility may need to be fed a collection of HTML documents that it would assemble into a single file to print. I would settle for code libraries that can work with this stuff. I believe that the server environment would be your normal Linux/Apache type server, but I need to make sure of that.

Here is the process flow.

·The customer would click a hyperlink in the current HTML file they are reading.

·The utility would do some stuff to make the file look nicer, such as strip navigational elements to other pages, and whatever else is necessary to make it look nicer to print.

·The HTML file, I suppose, would need to communicate to the utility that it is a part of a collection of files that the utility needs to get.

·The customer would then be directed to that dialog that asks if they want to download or save the document.

·None of this, or as little as possible, must run on the client computer.

Thanks.

Jim

Jim Homme,

Usability Services,

Phone: 412-544-1810.


This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.

Other related posts: