Android Question onFinish () PDFPrinter

hibrid0

Active Member
Licensed User
Longtime User
Hi to all people here, I'm using the PDF printer and I want to copy the file generated with PDF, but how I wait for finish PDF printing?

DoEvents? I see maybe cause problems.
Wait for, is the way? but how?
Sleep? Sometimes will work.
 

hibrid0

Active Member
Licensed User
Longtime User
Are you using PDFDocument? We cannot guess what you are doing if you post the wrong type names.
Thanks for your help Erel,, Im using the library to use the Android PDF printer, printing a webview or html.

B4X:
If Impresora1.PrintSupported=False Then
        Msgbox("Android PDF Printer not supported.", "Error")
    End If
'Save a List of all files on Download folder, before save PDF from Android Printer
    Starter.lista_archivos_antes.AddAll(File.ListFiles(File.DirRootExternal&"/Download"))
'Print Webview
    Impresora1.PrintWebView("job", WebView1)
    Sleep(5000)
 
    Dim archivo As String
' Function where I compare 2 list of files, get the diferents and save on var "archivo"
        archivo = functions.buscar_archivo_a_copiar

functions.FileMove(File.DirRootExternal&"/Download", archivo, NewPath, "new.pdf"$)
    ToastMessageShow("File Saved.", False)
 
Last edited:
Upvote 0
Top