Modulo di Classe
codice:
Cerca su google clsPDFCreator, il testo è troppo lungo per allegarlo.
MiaForm
codice:
Private Sub img_pdf_Click()
Dim clPDF As New clsPDFCreator
Dim strFile As String
strFile = "C:\test.pdf"
With clPDF
.Title = "Test"
.ScaleMode = pdfCentimeter
.PaperSize = pdfA4
.Margin = 0
.Orientation = pdfPortrait
.InitPDFFile strFile
.LoadFont "Fnt", "Arial"
Do While Not Rs.EOF
.BeginPage
.DrawText 1, 24, "1: ", "Fnt", 8
.DrawText 1, 23, "2: ", "Fnt", 8
.DrawText 5, 24, Rs.Fields("1").Value, "Fnt", 8
.DrawText 5, 20, Rs.Fields("2").Value, "Fnt", 8
Rs.MoveNext
.EndPage
Loop
.EndObject
.ClosePDFFile
End With
End Sub