Creating PDF Files in VB.NET 2005
I am having a problem while creating a PDF document, the text that I want to show in the PDF document exceeds the range of PDF documents. How do I adjust the text to fit the page range?
This is a sample of my code that shows some questions and answers:
Dim PDF As PDFCreatorPilotLib.PDFDocument3
' create pdf library object
PDF = New PDFCreatorPilotLib.PDFDocument3
' initialize PDF Engine
PDF.StartEngine("demo@demo", "demo")
' set filename
PDF.FileName = "TestVB.PDF"
PDF.AutoLaunch = True ' auto-open generated pdf document
' start document generation
PDF.BeginDoc()
PDF.PDFPAGE_SetActiveFont("Verdana", True, False, False, False, 9, 0)
PDF.PDFPAGE_TextOut(80, 270, 0, Label5.Text)
PDF.PDFPAGE_TextOut(100, 270, 0, Questions1TextBox.Text)
PDF.PDFPAGE_TextOut(80, 300, 0, Label3.Text)
PDF.PDFPAGE_TextOut(100, 300, 0, Answers1TextBox.Text)
PDF.PDFPAGE_TextOut(80, 330, 0, Label6.Text)
PDF.PDFPAGE_TextOut(100, 330, 0, TextBox14.Text)
PDF.PDFPAGE_TextOut(80, 360, 0, Label4.Text)
PDF.PDFPAGE_TextOut(100, 360, 0, TextBox1.Text)
PDF.PDFPAGE_TextOut(80, 390, 0, Label7.Text)
PDF.PDFPAGE_TextOut(100, 390, 0, TextBox12.Text)
PDF.PDFPAGE_TextOut(80, 420, 0, Label4.Text)
PDF.PDFPAGE_TextOut(100, 420, 0, TextBox1.Text)
' finalize document generation
PDF.EndDoc()
End Sub
+1
Khadi
a source
to share
No one has answered this question yet
Check out similar questions: