Hi,
Plz find below my function. I had arabic unicode strings stored in a txt file and I want to print those arabic strings in PDF file. But it is not
printing.
Private Sub DrawHelloWorld()
Dim objDoc As DynamicPDF.Document
Dim objPage As DynamicPDF.Page
Dim strText As String
'Create Document object and set properties
Set objDoc = New DynamicPDF.Document
objDoc.Creator = "HelloWorld.vbp"
objDoc.Author = "ceTe Software"
objDoc.Title = "Hello World"
'Add a page to the document
Set objPage = objDoc.AddPage()
'Add a textarea to the page
strText = "Hello VB World..." & vbCrLf & "From the Dynamic PDF Generator Type Library." & vbCrLf & "DynamicPDF.com"
Dim MyLabel As DynamicPDF.Label
Set MyLabel = objPage.AddLabel(strText, 0, 0, 504, 54)
' MyLabel.Align = DPDF_TextAlign_Center
' MyLabel.Font = DPDF_Font_Helvetica
' MyLabel.FontSize = 18
' Dim MyText
' MyText = "Copyright" & ChrW("169")
' Dim SetLFLabel
' Set SetLFLabel = objPage.AddLabel(MyText, 100, 230, 518, 18)
Dim fso As New FileSystemObject
Dim ts As TextStream
Dim MyText
Dim SetLFLabel
Set ts = fso.OpenTextFile("C:\Users\Rachna\Desktop\Unicode.txt", , , TristateTrue)
MyText = ts.ReadLine
Set SetLFLabel = objPage.AddLabel(MyText, 100, 230, 518, 18)
'Save the file to disk in same folder as the app
objDoc.DrawToFile ("C:\Users\Rachna\Desktop\HelloWorld.pdf")
'Display the file in the WebBrowser control
'objPDF.Navigate App.Path & "\HelloWorld.pdf"
'Object cleanup
Set objDoc = Nothing
End Sub