Roldanx
New Member
Erro: (Exception) java.lang.Exception: java.io.FileNotFoundException: /storage/emulated/0/PDFTeste.pdf: open failed: EPERM (Operation not permitted)
Error on Line 17:
Dim CC As ContentChooser
CC.Initialize("cc")
CC.Show("application/pdf", "Choose pdf file")
Wait For CC_Result(Success As Boolean, Dir As String, FileName As String)
If Success = True Then
Log(Dir)
Log(FileName)
Else
Msgbox("Não foi possível abrir o arquivo, por favor escolha o arquivo PDF e clique em cima dele.", "Arquivo não encontrado")
Return
End If
Try
File.Copy(Dir, FileName, File.DirRootExternal, "PDFTeste.pdf")
Catch
Log(LastException)
End Try
Dim filepdf As String = File.DirRootExternal & "/PDFTeste.pdf"
Dim filetxt As String = File.DirRootExternal & "/PDFTeste.txt"
Dim pdf As PdftToText
pdf.Initialize("pdf")
pdf.ParsePdf(filepdf, filetxt)
Dim wString As String
Try
wString = File.ReadString(File.DirRootExternal, "PDFTeste.txt")
Catch
Log(LastException)
End Try
Msgbox(wString, "texto do PDF")