Solved

HTML to PDF

Posted on 2012-03-21
10
419 Views
Last Modified: 2012-04-04
Hi Folks,

I have a bunch of html pages, like 500 or so. Instead of opening html file and selecting File > Print and then save.

How do I automate, either on the mac side or the PC side.

I have Cute PDF writer and Acrobat.

I would need some code samples on how to do it.

Thanks

RG
0
Comment
Question by:rgarimella
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 7

Expert Comment

by:micropc1
ID: 37749684
Try OmniFormat...  http://www.omniformat.com/

I've used it and it works great.
0
 

Author Comment

by:rgarimella
ID: 37749786
Do you know how to convert multiple HTML pages in a Folder using omniformat?
0
 
LVL 7

Accepted Solution

by:
micropc1 earned 500 total points
ID: 37750029
In Omniformat you set up a "watch" folder. Then you drag your files to the watch folder and it converts them automatically. I've used it to convert several thousand DOC files to PDF and it worked great. According to their website it also supports HTML.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:DrMadAxe
ID: 37750556
Omniformat is the way to go. Let us know if you have any problems using it. I concur with the others.
0
 

Author Comment

by:rgarimella
ID: 37750580
Unfortunately Omniformat is not working for me. My html pages have lot of DHTML code and the formatting is kinda lost. Are there any other solutions?
0
 
LVL 14

Expert Comment

by:binaryevo
ID: 37754390
0
 

Author Comment

by:rgarimella
ID: 37754453
Unfortunately this also does not work.. The site that I am converting uses lots of CSS

From the website:
This means any HTML using external or inline CSS for design and layout, including but not limited to: images, backgrounds, colours, fonts etc... will not be converted into the PDF.
0
 
LVL 1

Expert Comment

by:DrMadAxe
ID: 37755169
What about simply taking a screen shot of the page itself and then importing it into photoshop or download openoffice.org ( for free ) and use the "export to PDF" function

I understand that may take some time but since you have a more complex situation it may be what is necessary.

Hope this helps.
0
 

Author Comment

by:rgarimella
ID: 37757416
That is what I have, screenshots, not the optimal solution
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 37761225
xhtml2pdf (http://www.xhtml2pdf.com/) supports a decent subset of CSS but I doubt it'll have much luck with DHTML.

You might want to take a look at wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) which uses the webkit engine (QT, Safari) to render the html.  I haven't used it, as xhtml2pdf worked for my needs, but it may work for you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
storing csv file in table variable in Python 2 57
Google Dork query 7 55
php subtract from date 2 26
xml with php question 5 29
Flask is a microframework for Python based on Werkzeug and Jinja 2. This requires you to have a good understanding of Python 2.7. Lets install Flask! To install Flask you can use a python repository for libraries tool called pip. Download this f…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question