The PDF format is very commonly used. However, its hard to create PDF files in VB. In the past you had to usually resort to buying a third party control. Before you dish out the cash for a control you should check out this sample source code. It uses the mjwPDF class to generate PDFs from within VB for free. This is a simple sample that shows you how to add text to a PDF file, save it, and view it. Its very well commented. The mjwPDF class allows you to do much more than this. Still this source sample gives you a good basic understanding. After seeing this be sure to check out our other PDF sample source code or read our Creating PDF Files in Visual Basic tutorial to see a step by step guide to creating PDF files from Visual Basic.
If you have any ideas on how to improve this VB6 PDF sample source code please let me know. Also please rate this sample using the form below. Tell your friends - they don't need to pay for PDF creation anymore!
Download the VB PDF sample source code.
Comments
it did not work in acrobat
it did not work in acrobat reader 9...
remove it
this project is dum.
do not download it
creating pdf file
How we can convert text file to pdf file using visual c++ ?
Please reply.
vb 6.0
this article contains fucking bad info.dun read it
it will definately bore u off
pls help...
can u give sample program using OLE,DATA, COmbo box and timer..
tnx..
pls help...
can u give sample program using OLE,DATA, COmbo box and timer..
tnx..
Thank you very much for the
Thank you very much for the tutorials!
More power!
Great Job
Hi,
You've done great job. Thanks. Really...
It needs some copyrighting :-)
Acrobat version compatibility
I created an application in VB6 using the PDF creator on a Win2000 server with Acrobat Reader 7. When I deployed the application on a Windows XP it worked find. Now that the reader has been upgraded to version 9, the application crashes when calling it.
Are there any compatibility issues between the PFD creator and the different version of the Reader?
Image
I was checking the code and I see this PDFImage :
So everyone that want to put image in PDF file can use this code :
objPDF.PDFImage App.Path & "\Cradle_Of_Filth.jpg", 5, 5
app.path = Its the address of your application
Cradle_Of_Flith = Its my pic , you should use your pic , Notice "The extension of it must be jpg or jpeg"
First 5 : Is X Position of your pic in PDF
Second 5 : Is Y Position of your pic in PDF
Great work
Dear Sir,
Thank you so much for sharing your expertise on this forum.
Techie's like you make our life so easy !!
God Bless
How to convert PDF to text file
hi..
cud u plz send me the code for converting pdf into txt file.
Thanks!! in Advance.
PDF Image and text
Is there any way using this module to set an image as the background of the PDF file and have the text on top of the image?
Thanks in advance, really looking forward to using this, if it can do the above mentioned functionality!
employee information
hi
i need some code "read unlimited employees names and their salaries and findout the highest salary getting employee's name".
security feature
thanks for your source code in creating pdf files in VB 6 but my boss isnt satisfied with our current report generation. is it possible to set our newly created pdf file security that no one cannot edit our newly created pdf file? thanks in advance.
project about encrytion and decryption
hi friends,
Does anybody know how to encrypt and decrypt all kind of files(text file, image file, pdf file, ect,....) using a single visual basic or c++ source code program.
This is very urgent plz assist me by imparting some references or by your own program.
Is there a way to do this
Is there a way to do this with an Adobe control that is reliable? I've used two "Free" PDF conversion programs and they both lock up a few percent of the time and I get phone calls in the middle of the night every couple of weeks when they fail.
Thanks,
John
Merging PDF
Does anyone know how to merge a PDF and an Image in VB6
saving text file to pdf file
Hi,
I'm using the example code for saving a text file as a pdf. All works ok except the incoming text contains carriage returns which seem not to convert. For example:
This is my test.
To send to a pdf file.
is saved and displays after convert in pdf reader as
This is my test. To send to a pdf.
Any ideas?
I DONT KNOW THE FULL MEANING OF PDF
SS SOMEONE should tell me the full meaning of PDF and also define it for me. i need ur help. i have heard so much abt it but dont know it. i would also like to b using it in my programs. THANKS
RE:I don't Know the meaning of PDF
ITS Pure Durable File........
MS ACCESS to PDF
Hi How connect the Msacces to PDF (in VB)
f
ff
PDF Module-Total number of pages
Hi,
It's a wonderful class. It helped me a lot. I could not figure out how to print the Total number of pages on the page footer as in
'(currnet page number) of (Total pages)'. Kindly help.
Thanks in advance.
Using VB6 to create PFD File
Hi there,
I am trying to extract transactions from table and write it to PDF document using VB6 and doesn't know how to do it. Could some please share with me the VB6 scripting that does that ?
Thanks,
Cheers,
Lennie
pdf
even i am trying for the same thing.if you find it moving please let me know
VB - PDF module
It was a great module...
It works to make a pdf file, but the program become unstable, then an error report show up.
Maybe there is some process never end, i can't find it where.
Can u send me new fixed tutorial sample with more explanation in sourcecode view?
thanx, it is really good module
inserting fonts folder using access
Hi I am using MS access code builder, I could insert the mjwPDF class file but was unable to insert the FONT folder. Any help please.
Thanks Judson
great
great
Thanks for the nice tutorial
Thanks for the nice tutorial and source code.
great source - 10X!
great source - 10X!
Subcript out off range
When I try to create several PDF files after another, i get a Error message Subcripts out off range in de class module even if i use objPDF.PDFinit.
Is there a freindly way to avoid this type off errors ? Great Class by the way.
Paul
New Fonts
Did you ever figure out how to add more fonts? We need to have a lot more font options but I have not been able to add any yet.
PDF ClassModule
Great work!
I looked through he comments and was surprised too see that nobody asked anything about graphics inclusion. Typically professional (PDF) documents contain several graphics (letterhead, logo etc.)
Can it be done?
How to convert a word document to pdf using the above app
Hi there,
In the above application a text is hard coded in the source code itself for example : "Hello World". Can you tell me how can i select a word or excel document and then convert the same into pdf format using the above application. Thanks for your help in advance
x
It looks like the script I need. How can I use it in vb.net 2008
Great Source!
Thank you for this source, i was looking all around, and finally i found here what i was looking for!
Thanks Daniel / Germany
PDF Module
Thank you.............................!!!!
hi
Its great and helped me a lot...............thanks for ur help.
Regards,
Newstar.
about class PDF module
Hi there,
It was great to use this module to do what i want to do but is there any way it can do wordwrap as i have long description which should be displayed complete with a word wrap.
Thank you
Post new comment