HTTP Request: Destroys downloaded PDF¨s

Hi guys,

I am using the HTTP Request activity to download multiple PDF¨s.

The files are saved and there is no errors while running the workflow.

when I try to open the PDF¨s get an error message saying that Acrobat Reader DC cannot open the file and that the file type are not supported or the file is damaged.

The only entries I fill into the HTTP Request activity is

  1. End Point
  2. Resource Path.




What type of request are you using and are what extension are you specifying for the request? Keep in mind that the link for the download might not be available.


I pretty much do the same. Does this happen when you do manually? Can you share one link that you are using so i can try on my end, may be something to do with your Acrobat Reader.


I tested dowloading PDF¨s on open web pages employing the HTTP Request activity, which worked fine. The files I want to access is stored on protected area. Thus, I guess the authorization fields on the HTTP Request has to be filled?

Hi every one

I kind of stumbled onto the a version of the same problem. I tried to download a pdf from invoice-generator webpage. However when using the HTTP Request with EndPpoint property the URL and ResourcePath property the local file name a (.pdf), I get a pdf that has an error message saying that the file has been damaged or type is not supported.

Maybe there is a property wrong?
Given its an open website, i don’t think any authorization fields should be filed f.e.?

i faced same issue and had it fixed after providing username and password

1 Like

Are you referring to the Simple Authentication property? Where exactly do you find the username and password? I tried using the same credentials that were used to originally log into the web app, but that didn’t work.

EDIT: The status code is showing “200” which means it’s OK, but I still get the error message in the 1st post when attempting to open the PDF

I’m currently using right click–>save as–>type into activities to save PDFs, but this method would be so much quicker & more reliable if I could get it to work

Try add these to respective properties.

Response.ContentType = “Application/pdf”;
Response.AppendHeader(“Content-Disposition", "attachment; filename=Filename.pdf”);

I tried following by updating the BodyFormat and adding an In argument for Headers as seen below.

However, I opened the file that was saved (test1.pdf) with notepad++ and noticed it looked like an HTML file. I changed it the file extension to .html and attached it. It definitely has to do with invalid login credentials. I’m wondering if it’s an issue where the Simple Authentication isn’t passing the credentials properly? I’m using the exact same variables for username and password that I do to log into the application’s user interface - is that supposed to be using different credentials?
test1.html (14.8 KB)

For anyone in the future that sees this - it turns out that UiPath was not passing the username and password arguments. I looked at the error I was previously receiving by opening the file in notepad++ and noticed it was looking for arguments “userid” and “pwd”. I then created two Arguments for the Headers for userid and pwd.

Once performing the above steps, the PDF was downloaded successfully. No need to enter anything into the Simple Authentication, OAuth1, or OAuth2 fields if you use the headers to pass your authentication info

1 Like

Hi, how do you add those properties?

Hi I too get error, when I am trying to open PDF file downloaded in HTTP request. can you please help.

Hi @sjaagde6,

Can you try this to download check it.


Where did you provide this?

I used a HTTP request to get the statusCode. Everytime I cannot open the PDF file, the 404 statuscode is given. If statuscode is 200, the PDF works. However, this is not stable. Does somebody has a solution for this?

Hi @rrvdw

404 is a standard response that indicates that the file is not available:

Hi, I have the same issue, I’m begginer, I understand that the problem is with the Username and Pasword, but I can’t solve this yet. In the value space box what is must be fill it?

Hi, I need help for this link The first option it must be “Cédula de Ciudadanía” and second Option could be “36933362”. I´m trying to download the pdf file with HTTP Request, but I download just a pdf file corrupted o invalid. Please I’d like to know how i can download this kind of files. I bet the problem is whit the Endpoint, but I can’t fix it.