Loading...
Logo
Processing Forum
At the moment I'm still coding my website where I will place blog items. I write those blogs in texteditor and add images later on. So online everything looks good, but I don't have the files locally.

So what I was thinking to have an app made with processing that does the following:

1. Enter URL where the blog is located
2. Press Enter or click button to read all the html or xml data
3. Export automatically the PDF form/template (made with Adobe Acrobat) that paste the text and images in the assigned fields.


This way I can have a sleek archive from my blog items in the pdf format. Easy to find something back.
With  http://processing.org/reference/XMLElement.html I can load xml data, but I'm not sure about the exporting into the pdf form. And this library  http://creativecomputing.cc/p5libs/proxml/ also doesn't say anything about exporting.

Now is my question or this possible is with Processing, or do I have to take a look at Adobe Air?

Replies(4)

" I write those blogs in texteditor" ... " I don't have the files locally"
Look contradictory, unless you mean some text area in a Web page. Are you using a blog or a CMS application? Often, those offer an export option.

" Export automatically the PDF form/template (made with Adobe Acrobat) that paste the text and images in the assigned fields."
I don't follow you there, perhaps that's my lack of PDF knowledge. What PDF forms (like those to input names and address?) have to do with getting a Web site?

" This way I can have a sleek archive from my blog items in the pdf format."
Not a very good archive format. It will be hard to get back HTML from there if you even need to restore a page, for some reason.
Beside, I don't understand either what you plan to do between XML and PDF. I know utilities to convert HTML to PDF, but from XML, it would need quite some processing (no pun intended) to format it nicely.
@phil.lho

Thanks for your answer. Here is an image to make it more clear what I've in mind.


About the xml. I thought that xml was the best option for. From what I've read online, everybody is talking about xml and pdf forms so I thought that this was the standard. But I'm fine to use html as well. Would be even easier I guess. I hope the image gives a better view of what I'm looking for.
So you want to get Web site as XML data, and export it to PDF with a given layout, different from the Web one.
I suggest to have a look at the iText Java library, it is one of the best to output PDF (it is used by Processing, actually).
But it won't be straightforward.
Thanks for the answer. iText looks interesting. Going to check more about this and read this example from Toxi:  http://toxi.co.uk/blog/2007/08/creating-weblinks-in-pdf-with-itext.htm

But it doesn't have to be XML. I just thought that XML must be used to paste data in a pdf template. So if HTML is a much better way to do this I would love to hear