Discussion Forums  >  Uncategorized

Replies: 6    Views: 993

cjbaur
Android Fan
Profile
Posts: 3
Reg: Aug 29, 2011
Mittelneufnach
230
09/01/11 09:25 AM (14 years ago)

PDF-Link not working on Android

Hi Everybody. What a great service, but i had problems with a Custom-HTML-Page on my Android-App in development i can't understand. I'm working with V1.4 and tried it on my GalaxyII. I wanted to enter a Link to a pdf document, but id didn't open nor asked me to save it. Can anyone help please? Here is my tested Code: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta http-equiv=Content-Type content=text/html; charset=utf-8 /> <meta name=viewport content=width=320; initial-scale=1.0; user-scalable=1;/> <title>Ligapokal</title> </head> <body> <p align=center><a href=http://www.btg-info.de/media/archive1/Ligapokal.pdf target=_blank><img src=http://www.btg-info.de/themes/btg-info/images/pdf.png width=128 height=128 alt=Ligapokal /></a> </p> <p align=center><strong>Ligapokal komplette Tabelle</strong></p> </body> </html>
 
gereghas
Aspiring developer
Profile
Posts: 45
Reg: May 14, 2011
Oklahoma
1,250
like
09/01/11 01:34 PM (14 years ago)
Are you trying to do this on an Android Simulator? I believe that you have to have another app that can open pdf's installed on the device as the device itself does not know how to handle a pdf file.
 
koopakid08
Aspiring developer
Profile
Posts: 74
Reg: Jun 14, 2011
earth
1,540
like
09/01/11 10:20 PM (14 years ago)
Download adobe reader or ezpdf
 
cjbaur
Android Fan
Profile
Posts: 3
Reg: Aug 29, 2011
Mittelneufnach
230
like
09/02/11 02:14 AM (14 years ago)
I've tried it on my Galaxy. The problem is: the same site shown in the built-in Browser or in Opera works. It doesn't matter if it's this site or another with a pdf-link, the pdf shows up (i have Polaris Office and the Adobe Reader installed). The site shown within the app (Custom HTML or Custom URL) does not show up the PDF. What Browser-Engine is the app using to show html content?
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
09/02/11 02:37 PM (14 years ago)
If you use the Custom URL option, check out the Screen_CustomURL.java file, about half way down the page is a list of file extensions and how to open them. Copy/Paste an existing code block and make it for .pdf - it should be self explanatory when you look at the code. Select ''1'' to open the pdf with whatever your phone uses (native intent). That should work.
 
cjbaur
Android Fan
Profile
Posts: 3
Reg: Aug 29, 2011
Mittelneufnach
230
like
09/04/11 12:32 AM (14 years ago)
Thanks raveyd for this tip, it worked great for me!!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
09/04/11 04:07 AM (14 years ago)
Glad to hear it!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.