You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Harriet Louis <ha...@jasco.co.za> on 2014/02/18 08:49:37 UTC

Text to PDF

Hello All,

I have already used the TextToPDF commandline utility, and it is working great. However, I would like to do it programmatically, where I input a text file, and specify an output pdf filename.
So far, I could only write a string of text to the pdf output file successfully.  (see attached source code).

Can you please suggest how to read an input text file programmatically, and then create a pdf file from the input?

Regards,
Harriet

This email from Jasco is subject to our email legal notice, to view please visit http://www.jasco.co.za/email-disclaimer.aspx

Re: Text to PDF

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

Why don't you look at the source code? You can expand that one to what 
you need.
http://www.apache.org/dyn/closer.cgi/pdfbox/1.8.4/pdfbox-1.8.4-src.zip
Tilman

Am 18.02.2014 08:49, schrieb Harriet Louis:
>
> Hello All,
>
> I have already used the TextToPDF commandline utility, and it is 
> working great. However, I would like to do it programmatically, where 
> I input a text file, and specify an output pdf filename.
>
> So far, I could only write a string of text to the pdf output file 
> successfully.  (see attached source code).
>
> Can you please suggest how to read an input text file 
> programmatically, and then create a pdf file from the input?
>
> Regards,
>
> Harriet
>
> This email from Jasco is subject to our email legal notice, to view 
> please visit http://www.jasco.co.za/email-disclaimer.aspx