Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
sasmita swain
html to pdf converter
March 19, 2013 8:57 PM
Answer

sasmita swain

Rank: Regular Member

Posts: 185

Join Date: February 24, 2012

Recent Posts

Hi

I am working on LR6.1 ga2.. i want to convert html page to pdf converter..can any body tell me how to convert one html page to pdf and that pdf i have to send in user mailid..

Thanks

Sasmita
Gaurav Jain
RE: html to pdf converter
March 19, 2013 9:05 PM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 141

Join Date: January 31, 2011

Recent Posts

You can use open office for the document conversions.
Liferay has inbuilt features for integration with open-office.
Some reference links:
http://itsliferay.wordpress.com/2012/09/10/document-conversion-using-liferay-way/

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/openoffice

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen12-server-administration-0
fdsf fdsfd
RE: html to pdf converter
July 1, 2013 2:45 AM
Answer

fdsf fdsfd

Rank: New Member

Posts: 1

Join Date: July 1, 2013

Recent Posts

here are some html to pdf codes on vb.net, it is quite simple and easy to convert pages . it is somehting you can integrate with this forum.
Manish Yadav
RE: html to pdf converter
July 1, 2013 6:02 AM
Answer

Manish Yadav

Rank: Expert

Posts: 384

Join Date: May 26, 2012

Recent Posts

sasmita swain:
Hi

I am working on LR6.1 ga2.. i want to convert html page to pdf converter..can any body tell me how to convert one html page to pdf and that pdf i have to send in user mailid..

Thanks

Sasmita


Try Apache PDFBox

Regards,
Manish Banwari Lal Yadav
Pranoti Nandurkar
RE: html to pdf converter
July 1, 2013 6:47 AM
Answer

Pranoti Nandurkar

Rank: Junior Member

Posts: 46

Join Date: February 2, 2012

Recent Posts

Hi,
you can use iText converter to convert HTML to pdf:

Java code using iText API is :
 1
 2private void createPDF (){ 
 3 
 4  String path = "D:/Deiva/Test.pdf"; 
 5  PdfWriter pdfWriter = null; 
 6 
 7  //create a new document 
 8  Document document = new Document(); 
 9 
10  try { 
11 
12   //get Instance of the PDFWriter 
13   pdfWriter = PdfWriter.getInstance(document, new FileOutputStream(path)); 
14 
15   //document header attributes 
16   document.addAuthor("betterThanZero"); 
17   document.addCreationDate(); 
18   document.addProducer(); 
19   document.addCreator("MySampleCode.com"); 
20   document.addTitle("Demo for iText XMLWorker"); 
21   document.setPageSize(PageSize.LETTER); 
22 
23   //open document 
24   document.open(); 
25   InputStream is = new FileInputStream("D:/Deiva/CRs/Oncology/Phase5/CR1/HTMLPage/Article.html"); 
26 
27   // create new input stream reader 
28   InputStreamReader isr = new InputStreamReader(is); 
29 
30   //get the XMLWorkerHelper Instance 
31   XMLWorkerHelper worker = XMLWorkerHelper.getInstance(); 
32   //convert to PDF 
33   worker.parseXHtml(pdfWriter, document, isr); 
34 
35   //close the document 
36   document.close(); 
37   //close the writer 
38   pdfWriter.close(); 
39 
40  } catch (Exception e) { 
41      e.printStackTrace(); 
42  } 
43 
44
Jerry Smith
RE: html to pdf converter
October 8, 2013 7:25 PM
Answer

Jerry Smith

Rank: New Member

Posts: 1

Join Date: October 8, 2013

Recent Posts

Here is a free PDF conversion SDK that supports converting PDF documents to other image & document formats and vice versa. You may download this PDF converter to convert html to PDF. PDF, known as Portable Document Format, has been widely used by enterprises and institutions for document viewing and exchanging.