How to open a pdf as web page

pdf
studio

#1

Can anyone tell me how to open a pdf as web page and extract a part of data. I could open a pdf if it is stored locally and extracted data using Google OCR. Please find the screenshot of my pdf file location:


#2

Hey @sinara

As a web page means you wanna open it with Browser?

Then you can use like this:
image

Regards…!!
AKsh


#3

You can use get attribute activity to extract the URL of the PDF on the webpage. Input to get attribute will be the selector of PDF and attribute name will be url.

If you are able to extract the url, you can use start process to open that PDF … OR you can use new tab hotkey and type in the url.


#4

well if that web page script has been code with header property to force download then even if you will use that url that web page controller will return on that Url the default download response but still depends on the web page behavior.


#5

Hi @aksh1yadav,

My Pdf files are in a web application, So when you click on pdf , it will open as a web page.I would like to know how to achieve it through UIPath. Start Process expects the file in local system, correct ?


#6

you can use simple Click activity then it will open that pdf in the next tab then use hot key ctrl+tab it will jump to the very next tab,

Nop it will work with the website links as well
For example try this url with above screen "iexplore.exe"
argument - “http://che.org.il/wp-content/uploads/2016/12/pdf-sample.pdf

So it is a web application and most important it is opening the file in the new tab for view so you can get that link url first by using Get Attribute activity and then you can pass that url with start process.

Regards…!!
Aksh


#7

I think that depends on Acrobat Reader setting to open pdf in browser.


#8

Nop my context was different.

although u can use adobe acrobet exe with file path as a paramter.
and back to my point,
My context was if u r aware with server side scripting language like php and so… if you are generating pdf or providing any option to download a file from server then their at the time of either pdf creation script and similarly to download a file their is one header() function avialble that will force the browser to prompt a download dialog instead of to open it in a new tab or in the same tab as well.

Example Support Article Link


#9

Yes, I understood your point. :slight_smile:

So he will need to check regarding that.