Generate PDF documents from visual basic using mjwPDF which can download from here includes some PDF Fonts also:
http://www.vb6.us/files/tutorials/CreatingPDFdocuments/mjwPDF-class.zip
Here is how you can create a simple PDF File:
-
Private Sub Command1_Click()
-
' Create a simple PDF file using the mjwPDF class
-
Dim objPDF As New mjwPDF
-
-
' Set the PDF title and filename
-
objPDF.PDFTitle = "Test PDF Document"
-
objPDF.PDFFileName = App.Path & "\test.pdf"
-
-
' We must tell the class where the PDF fonts are located
-
objPDF.PDFLoadAfm = App.Path & "\Fonts"
-
-
' View the PDF file after we create it
-
objPDF.PDFView = True
-
-
' Begin our PDF document
-
objPDF.PDFBeginDoc
-
' Set the font name, size, and style
-
objPDF.PDFSetFont FONT_ARIAL, 15, FONT_BOLD
-
-
' Set the text color
-
objPDF.PDFSetTextColor = vbBlue
-
-
' Set the text we want to print
-
objPDF.PDFTextOut _
-
"Hello, World! From mjwPDF (www.vb6.us)"
-
-
' End our PDF document (this will save it to the filename)
-
objPDF.PDFEndDoc
-
End Sub
For complete process checkout this link:
http://www.vb6.us/tutorials/visual-basic-tutorial-pdf (This page consists of two tutorials basic and advanced)
Hope this helps!
Thanks