Italian Pdf nell'applicazione. Come fare??

mauri74doc

Member
Licensed User
Longtime User

I Pdf non li devo convertire dentro l'app. Li converto prima con un qualsiasi software di conversione testi (da txt a pdf). A me serve un codice per aprirli ( e non convertirli) dentro l'applicazione, cioè file pdf che saranno presenti in undatabse.
 

maxware

Well-Known Member
Licensed User
Longtime User
Ciao Mauri
Ho provato ora con il tuo file sul mio note e tutto funziona
eccoti il codice
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Button1 As Button
Dim v_path As String
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("pan1")
End Sub

Sub Button1_Click
v_path=File.DirRootExternal & "/pdf/"
Dim file_pdf As Intent
file_pdf.Initialize(file_pdf.ACTION_VIEW, "file:" & v_path & "incrostazione pentola4.pdf")
file_pdf.SetType("application/pdf")
'file_pdf.WrapAsIntentChooser("Choose PDF Viewer") ' questa riga ti fa chiedere con che programmi vuoi aprirlo
StartActivity(file_pdf)
End Sub
 

corrado

Member
Licensed User
Longtime User

Ciao Max sono Corrado.
Una domandina al volo: per gestire questi file PDF,
devo carivcare qualche libreria?
Ciao
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…