Android Question [Solved]How to Code PDFView1?

Theera

Well-Known Member
Licensed User
Longtime User
Refer to this
B4X:
   File.Copy(File.DirAssets, "1.pdf", File.DirInternal,"1.pdf")
    Sleep(300)
  
    'Any File to Encode64
    Dim pdf_base64 As String = Base64EncodeDecodeImage.Base64AnyFileToString(File.DirInternal, "1.pdf")
 
    'Check if Valid Base64
    If Base64EncodeDecodeImage.ValidBase64(pdf_base64) Then
        PDFView1.fromFile(File.DirInternal,Base64EncodeDecodeImage.Base64StringToAnyFile(pdf_base64,File.DirInternal, "1.pdf"))
  
    End If

How to code at the line of PDFView1 for display the result?
 

teddybear

Well-Known Member
Licensed User
1.Base64EncodeDecodeImage.Base64StringToAnyFile(pdf_base64,File.DirInternal, "1.pdf") does not return a filename, you need to do like this.
B4X:
Base64EncodeDecodeImage.Base64StringToAnyFile(pdf_base64,File.DirInternal, "1.pdf")
Dim pdfcfg As Configurator = PDFView1.fromFile(File.DirInternal, "1.pdf")
pdfcfg.load
2. The most important thing is that you should see how the PDFView works first.
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
B4X:
Base64EncodeDecodeImage.Base64StringToAnyFile(pdf_base64,File.DirInternal, "1.pdf") does not return a filename, you need to do like this.

You're right but I can't explain in English, so Icoded the errored code.Thank you for your help.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…