cancel
Showing results for 
Search instead for 
Did you mean: 

convert .txt file to .pdf using java code

Former Member
0 Kudos

Hi,

My requirement is to read the .txt file and convert it into .pdf file after changing certain text.

Searched the net got a document on iText ..is it the only way for conversion or any other method....please help.

Thanks in advance.

Pooja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi.

You could review this [url|http://www.roseindia.net/java/java-conversion/TextToPDF.shtml].

It is a good example to use the iText Library.

The other option could be [PDFBox|http://pdfbox.apache.org/].

Here some [example code|http://pdfbox.apache.org/userguide/cookbook/creation.html#HelloWorld].

Another option, but more complicated is [Apache FOP|http://xmlgraphics.apache.org/fop/].

I hope you can find the right solution.

Kindest regards, have a great day

Answers (2)

Answers (2)

Former Member
0 Kudos

Use this Text file to PDF converter , it uses java language to convert your text files to pdf and it save your coding time also so i would suggest you to try this cloud API hopefully it will benefit you.

Former Member
0 Kudos

Thanks