I am using evaluating GDViewer with RealBasic and everything seems to be working very well. However, I have a problem that I hope you can help with:
When I load a PDF directly from a file there is no problem. However, when I load the PDF file contents into a string and try to use DisplayFromString I get a result of 13 and cannot open from string. Here is a code sample in RealBasic 2008:
Code: Select all
Sub OpenPDF(f as folderitem)
dim nState as integer
dim tis as TextInputStream
If f <> Nil then
if f.Exists then
call gdviewer1.SetLicenseNumber("Removed")
tis = f.OpenAsTextFile
'nState = GdViewer1.DisplayFromPdfFile(f.AbsolutePath) 'I commented out this line, which works and loads the pdf properly
nState = GdViewer1.DisplayFromString(tis.ReadAll) 'here is where I have trouble, it returns 13 instead of 0
tis.close
Else
msgbox "File Not Found."
End if
else
quit
end if
End Sub
Thanks!
-Mike