Hi all,
In my code, I am creating a pdf document. So far so good.
Then I would like to view the created pdf.
I install the PDFium library and -crack!- PDFDocument no longer works.
LOG:
pdf.Initialize "(" expected
unknown member : close
unknown member : writetostream
unknown member : finishpage
unknown member : canvas
unknown member : startpage
Where is the problem?
Can anyone help me?
In my code, I am creating a pdf document. So far so good.
B4X:
Private Sub imgpdf
'A4 Size
Dim w As Int = 595
Dim h As Int = 842
Dim pdf As PdfDocument
pdf.Initialize
pdf.StartPage(w, h)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize(Main.FileDir, Main.FileName)
Dim SrcRect As Rect
SrcRect.Initialize(0, 0, Bitmap1.Width, Bitmap1.Height)
Dim DestRect As Rect
'Dim left As Double
'left = w-Bitmap1.Width
DestRect.Initialize(0, 0, Bitmap1.Width, h)
pdf.Canvas.DrawBitmap(Bitmap1, SrcRect, DestRect)
pdf.FinishPage
Dim out As OutputStream = File.OpenOutput(Main.FileDir, Main.FileName, False)
pdf.WriteToStream(out)
out.Close
pdf.Close
Dim in As InputStream = File.OpenInput(Main.FileDir, Main.FileName)
Wait For (FileHandler1.SaveAs(in, "application/pdf", "YourFile.pdf")) Complete (Success As Boolean)
If Success Then
toast.Show("File saved successfully")
Else
toast.Show("File not saved")
End If
End Sub
Then I would like to view the created pdf.
I install the PDFium library and -crack!- PDFDocument no longer works.
LOG:
pdf.Initialize "(" expected
unknown member : close
unknown member : writetostream
unknown member : finishpage
unknown member : canvas
unknown member : startpage
Where is the problem?
Can anyone help me?