Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim textinput As String
- ________________________________________________________________
- 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 = " "
- objPDF.PDFFileName = App.Path & "\NEWFILE.pdf"
- ' We must tell the class where the PDF fonts are located
- objPDF.PDFLoadAfm = App.Path & "\Fonts"
- ' inserted code- L2
- ' Set the file properties
- objPDF.PDFSetLayoutMode = LAYOUT_DEFAULT
- objPDF.PDFFormatPage = FORMAT_A4
- objPDF.PDFOrientation = ORIENT_PORTRAIT
- objPDF.PDFSetUnit = UNIT_PT
- 'end L2 insert
- ' View the PDF file after we create it
- objPDF.PDFView = False
- ' 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
- 'Another implementation of the above code
- objPDF.PDFSetFont FONT_ARIAL, 15, FONT_BOLD
- objPDF.PDFSetDrawColor = vbRed
- objPDF.PDFSetTextColor = vbWhite
- objPDF.PDFSetAlignement = ALIGN_CENTER
- objPDF.PDFSetBorder = BORDER_ALL
- objPDF.PDFSetFill = True
- objPDF.PDFCell "This Document Was generated by PDF-WRITE V. 1.0 Free Edition.", 15, 15, _
- objPDF.PDFGetPageWidth - 30, 40
- 'Customized Code
- objPDF.PDFSetFont FONT_TIMES, 12, FONT_NORMAL
- objPDF.PDFSetDrawColor = vbWhite
- objPDF.PDFSetTextColor = vbBlack
- objPDF.PDFSetAlignement = ALIGN_LEFT
- objPDF.PDFTextOut _
- "textinput"
- objPDF.PDFEndDoc
- End Sub
- _________________________________________________________________________________
- Private Sub Text1_Change()
- textinput = Text1.Text
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement