I am using Wokawidget printtopdf code.The code is great but I am having a bit of a problem.I can't get the text to break. I attatched a picture of how the text is now. The new line never starts in the pdf.The code is:
VB Code:
Dim clPDF As New clsPDFCreator Dim strFile As String Dim i As Single a = InputBox$("Please Specify the Path of The PDF File ", "Path For PDF", , 7000, 4500) strFile = a & ".pdf" With clPDF .ScaleMode = pdfCentimeter .PaperSize = pdfA4 .Margin = 0 .Orientation = pdfPortrait .InitPDFFile strFile .LoadFont "Fnt1", "Times New Roman" .LoadFont "Fnt2", "Arial", pdfItalic .LoadFont "Fnt3", "Courier New" .LoadFontStandard "Fnt4", "Courier New", pdfBoldItalic .StartObject "Item1", pdfOddPages .SetColorFill -240 .SetTextHorizontalScaling 120 .SetColorFill 0 .EndObject .StartPage For x = 0 To frmstats.List1.ListCount - 1 B = B & frmstats.List1.List(x) & vbCrLf Next x .DrawText 10.5, 27, B & vbCrLf, "Fnt1", 12, pdfCenter & vbCrLf .SetTextHorizontalScaling 70 .SetTextHorizontalScaling 100 .SetCharSpacing 10 .SetWordSpacing 60 .EndPage .ClosePDFFile End With
Thanks a bunch for wonderful code




Reply With Quote