HTML to PDF...

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers HTML to PDF...
# 1  
Old 02-28-2014
HTML to PDF...


I am new to UNIX system. I want to convert HTML file to some non-editable format as we ship this doc to our customer. I am looking for following scripts/utilities:

1. Script/Utility to convert HTML file in PDF format.
2. Script/Utility to convert HTML file in Postscript format.
3. Script/Utility to convert HTML file in read only HTML file.

# 2  
Old 02-28-2014
1)2) : Google is your best friend here, since there are plenty utilities out there if you do a search, like html2pdf...
 chmod 444 HTML-file

will make HTML-file read only...
# 3  
Old 02-28-2014
Hi Abhishek,

Just remember that google is your customers friend as well - just as there is html2pdf there is also pdf2htmlSmilie

If you want to ensure that it is beyond being edited I'd suggest that you send them hard copy only, the task of inputing the code may put them off. Alternatively you may want to send the document as a series of JPEG's or similar!

Finaly if the file is placed on the customers system and they have priv access to the system then;

chmod 666 filename

Will allow them to edit it again.


Last edited by gull04; 02-28-2014 at 08:54 AM.. Reason: Incomplete posting.
# 4  
Old 02-28-2014
One thing you can try is use the unoconv tool (Google it) to convert the HTML to PDF format.

Open 2 terminals.  In one start the listener - unoconv -l

In the other run this command to convert the HTML file:

unoconv -v -f <HTML File>

Creates a PDF version of the file. CTRL-C the listener.

The install the PDF Took Kit (pdftk) and encrypt the new PDF file:

pdftk <Converted PDF> output <Encrypted Version> owner_pw <password>

The plus is if they attempt to convert the PDF back to HTML it'll appear as a bunch of garbage characters.

Note, this is not a bullet proof solution, but may fool the average bear.

Good luck.
# 5  
Old 03-01-2014
Unless your document is simply a set of images, there are utilities available that will convert the document back to editable text
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting secured pdf files to pdf using acroread

Does anybody have idea of Converting secured pdf files to pdf using acroread ? ---------- Post updated at 04:49 PM ---------- Previous update was at 04:44 PM ---------- This file is not password protected. (4 Replies)
Discussion started by: Soham
4 Replies

2. Shell Programming and Scripting

PDF Script to extract PDF Links MOD in Need

In here we have a script to extract all pdf links from a single page.. any idea's in how make this read instead of a page a list of pages.. and extract all pdf links ? #!/bin/bash # NAME: pdflinkextractor # AUTHOR: Glutanimate (, 2013 #... (1 Reply)
Discussion started by: danielldf
1 Replies

3. Shell Programming and Scripting

How to send email HTML + PDF attachment?

I am attempting to write a script where I can pass in parameters ( to , from, the location of a pdf attachment ) and send an email that has HTML for the body content and a PDF as an attachment. I have failed to achieve this with sendmail and mutt. I recently found this. If there are any... (2 Replies)
Discussion started by: jvsrvcs
2 Replies

4. Shell Programming and Scripting

Using CSH and need to convert html to PDF

Hi, I am currently using the below code and it throws an error saying badly placed ()'s. I am not sure if this right way to convert html to PDF, please help..I am using C-shell script system ("../html2doc pdf 1000 portrait html$prnfile.html $prnfile.pdf ") print "Content-type:application/pdf... (7 Replies)
Discussion started by: lakers646
7 Replies

5. Shell Programming and Scripting

Mail sending with multiple attachement(pdf and csv) with html content from Linux

Hi, We have a requirement to send multiple attachment(pdf and csv) along with html content in a single mail. For that we are using uuencode. It is working for single pdf attachment and html content. But we are unable to send both pdf and csv attachment with html content. Below is the script.... (5 Replies)
Discussion started by: dholea
5 Replies

6. UNIX for Advanced & Expert Users

Mutt for html body and multiple html & pdf attachments

Hi all: Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project. There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues. Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies

7. Ubuntu

Fetch html page convert to pdf automatically via cmd or other means, shortcut

Hi, Im used to compiling when i stumble upon some interesting topics in the net and convert it into pdf files unto my HD for future reference's. I using the chrome print to pdf procedure since firefox html to pdf don't work correctly. I just wonder in someone do same thing and did it in a easy... (3 Replies)
Discussion started by: jao_madn
3 Replies

8. Shell Programming and Scripting

Perl - Convert html to pdf - PDF::FromHTML

Hi, I am trying to convert html to pdf using perl module PDF::FromHTML, am getting the error as given below. not well-formed (invalid token) at line 2, column 17, byte 56 at C:/Perl/lib/XML/ line 187 at C:/Perl/site/lib/PDF/ line 140 The perl code is as given... (2 Replies)
Discussion started by: DILEEP410
2 Replies

9. Shell Programming and Scripting

Converting html to pdf perl

Hi All, I have a requirement of converting an html form into pdf using perl. The html form contains images, tables and css implementation. I tried using various perl modules but failed to achive the target. I succeeded in generating a pdf from the html file using... (2 Replies)
Discussion started by: DILEEP410
2 Replies
Login or Register to Ask a Question