How to count pages in PDF without downloading the PDF files to the local machine.i.e count the pages online

i need retrieve the page count of individual pdf files ( list of 1000 pdfs.) without downloading it. get pdf pagecount - not accepting the online PDF uRL…

1 Like

Here’s the solution!!!

here are the steps:

  1. Use Directory.GetFIles(Path) to get all the files in the folder…
  2. Use for each loop to loop through all the files
  3. Within for each loop, do all the things you need
  4. To skip if fails, try usinf TRY CATCH activities inside the for each loop

Solution to count all pages

Hi

Pls clarify with the manual steps on how you will be calculating the page number of one pdf file without downloading.
So that the same steps can be replicated with uipath

We can readily tell the sequence of activities that could be used

@sri24

You are not going to be able to achieve this without downloading the pdf.

Hi,

There are couple of online tools to extract information (Metadata/EXIF info) for the files. You might have to provide your PDF files Link (Which means sharing your file - make sure files don’t have sensitive information) and tool will extract and show you the information.

At the end you can extract file information without downloading/opening it.

I have used the streamreader to open the file without downloading but it uses the regex “/Type\s*/Page[^s]”

The output page count is different from that mentioned in the PDF.

PDFCount_web_single.xaml (7.6 KB)