Can’t read PDF downloaded from server

I made use of src=” example.pdf” to switched out the web file hyperlink. As suggested by some various other posts, I spared the pdf data in a file named web, but it still certainly not functioning.

I assume that it isn’t the PDF that is actually getting harmed, but the images within it.

I’m downloading a PDF from my server. The hosting server deliver me a HttpResponse along with the InputStream of report’s physical body. I have the ability to compose it in to a data but, when I attempt to read it with a PDF viewers, it informs me that the file could be actually corrupted.

Some time back, some hosting server admins were actually possessing issues along with images obtaining contaminated through apache2. See as an example serverfault as well as drupal Question.

And also inspect the directory site (via the report device, e.g. position the phone to your pc or a data supervisor app) for the installed material to validate it is a pdf.

I would certainly propose examining your URL. It appears that you may be downloading an html page instead of the pdf. To verify you are installing properly, change the download directory site

The planned option is to alter a pair of environments in the apache2 config documents. I feel mind mapping is actually the issue, which may be shut down by adding the adhering to command to apache2.conf in my android application to see PDF documents from the possessions file inside the application yet it is certainly not functioning. It shows a blank display screen. Right here is what I performed: I added this dependency in the build.gradle documents

I am actually using a Debian EC2 circumstances running a Apache2 hosting server (from the available semantic search bundle).

there is a demonstration over github along with the collection that you uploaded. inspect the code for asking for read storage consent and also apply it in your code.

I found referral ( to customize the Apache configuration report to include

When I attempt to open up a pdf data in the web internet browser (inline?), it opens up a customized version of it when the documents is positioned on a remote control file yet not when the file lies regionally.

I make an effort to open up PDF file in Oreo but it carries out not available. I do not receive any kind of error. What is actually the issue? PDF data performs not open. Just black monitor is actually presented. In logcat no mistakes reveal.

You possess 2 possibilities. The initial one: just put your file example.pdf on a/ information superhighway directory where your application data is actually. The 2nd: use the addResourcePath feature before running your app to create a nearby directory available.

Try your code on 2 or even 3 different Links. Make an effort to open them with a basic PDF customer (e.g. adobe visitor). If your URL’s pdf can closed (mentioning its harmed) while the various other pdfs can, at that point you are actually downloading and install an HTML page.

I have actually likewise noticed that the size of the PDF downloaded and install straight from internet company is twice the size of the PDF downloaded through my request.

Leave a Reply

Your email address will not be published. Required fields are marked *