Converting a pdf to .txt and adding the page numbers to the end

Hi, i’m trying to convert this pdf i have to a .txt file. I want the pdf page numbers or something like “start of page 1, 2 etc” to be at the start of each page in the final .txt file.

I saw a similar post about this, but it involved generating individual .txt files. I only want one long file.

I also need to mention that I’m a beginner to studioX/uipath. Thanks!

1 Like

Hi @Billy_Persen ,

You should be able to accomplish this using UiPath.PDF.Activities library, try following these steps

  • Install UiPath.PDF.Activities library
    image

  • Get the page count
    image
    image

  • Create a variable of int type, you can call it PageIndex and set the value to 1
    image

  • Add a Do While activity and set the condition to PageIndex<=PageCount
    image

  • Add these steps inside your do while

  • Use these properties in the Read PDF Text activity
    image

hope this helps.

1 Like

I’m kind of stuck on this one place, i can’t seem to find the do while activity

image

@Billy_Persen, I believe is called Repeat on StudioX but the logic should be the same

Check this post:

Possible to create a loop until activity in StudioX? - Help / StudioX - UiPath Community Forum

Everything you said worked perfectly, thank you!

1 Like

Converting a pdf to . txt and adding the page numbers to the end
Install UiPath.PDF.Activities library.
Get the page count.
Create a variable of int type, you can call it PageIndex and set the value to 1.
Add a Do While activity and set the condition to PageIndex<=PageCount.
Add these steps inside your do while.

Regards,
Will

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.