Creating a pdf with text from a .txt file

Discussions about PDF management.
Post Reply
kulsumarif
Posts: 3
Joined: Tue Aug 20, 2013 12:08 am

Creating a pdf with text from a .txt file

Post by kulsumarif » Tue Aug 20, 2013 12:14 am

We have a purchased license of Gdpicture pdf plugin

I am looking to convert a txt file to pdf using this. I tried using
DrawText
but have to set DstX and DstY. I basically just want to keep adding these lines to the new pdf created.

what would be a good way to do this?

Thanks,
Kulsum

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Creating a pdf with text from a .txt file

Post by SamiKharma » Wed Aug 21, 2013 10:10 am

Hi,

We will include a Text File to PDF sample demo in V10. It still uses the DrawText function, but it will show you how to accomplish this task very simply.

Best,
Sami

kulsumarif
Posts: 3
Joined: Tue Aug 20, 2013 12:08 am

Re: Creating a pdf with text from a .txt file

Post by kulsumarif » Wed Aug 21, 2013 7:13 pm

We purchased your 9.3 version. Any way you could send me a sample for this please?

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Creating a pdf with text from a .txt file

Post by SamiKharma » Thu Aug 22, 2013 10:52 am

Hi,

A tutorial based on the demo will be added to a knowledge base we are working on and should be available within three weeks time (early to mid September 2013).

Best,
Sami

kulsumarif
Posts: 3
Joined: Tue Aug 20, 2013 12:08 am

Re: Creating a pdf with text from a .txt file

Post by kulsumarif » Thu Aug 22, 2013 7:35 pm

Sami,

Is there any way you could get me the snippet. Three weeks might not work with the deadline I have.

I really appreciate anything you could do to help me.

sriramps
Posts: 2
Joined: Wed Oct 09, 2013 5:16 pm

Re: Creating a pdf with text from a .txt file

Post by sriramps » Wed Oct 09, 2013 5:18 pm

Where is the sample for converting txt file to pdf? also, is there a way to convert any stream (Stream can be from a doc file or a html file or a outlook msg file) to PDF? Currently I can create PDF only from a pdf stream...any sample on this will be really helpful.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Creating a pdf with text from a .txt file

Post by SamiKharma » Thu Oct 10, 2013 11:30 am

Hi,

>>Where is the sample for converting txt file to pdf?
It was added to the C# and VB.NET demos available in the Samples folder of the GdPicture10 directory. It was too big and detailed to be included as a simple tutorial.

>>also, is there a way to convert any stream (Stream can be from a doc file or a html file or a outlook msg file) to PDF? Currently I can create PDF only from a pdf stream...any sample on this will be really helpful.
No, unfortunately that is not possible.

Best,
Sami

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Creating a pdf with text from a .txt file

Post by Loïc » Sat Oct 12, 2013 5:14 pm

Hello there,

Small correction: GdPicturePDF like other GdPicture classes can deal with any inherited Stream object.

Kind regards,

Loïc

Gabriela
Posts: 436
Joined: Wed Nov 22, 2017 9:52 am

Re: Creating a pdf with text from a .txt file

Post by Gabriela » Sun Feb 03, 2019 6:56 pm

Hello,

Now you can convert your text file to PDF document using the GdPictureDocumentConverter class, which is very simple and straightforward:
https://www.gdpicture.com/guides/gdpicture/web ... erter.html

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest