I’m currently trying to get only odd pages from a PDF and having 0 luck, but I can’t imagine I’m the only one in this boat, so any help/ideas would be appreciated. I need the file to save over itself essentially, not create new file.
Options I’ve tried/Result:
UiPath activity - Extract PDF Page Range
Struggling to select range as page numbers vary and regex doesn’t seem to be appreciated, also on a test of getting only 5 pages out of a 43 page document I used for testing the file size was 1MB for 5 pages, despite the 43 page version being 2.7MB so clearly not being compressed properly, unsure if UiPath/Adobe’s fault. Also can’t use the same file name.
Automating option 1, Print PDF>Adobe PDF>Not as image
The output file size is massive, from page 2 onwards the text is completely jumbled and the output file is now portrait. I have opened Adobe Distiller and saved settings as “Smallest File Size”, turned autorotate off and embedded all fonts, the result when printing using this profile though is that despite it being a smaller file size, it is still portrait and jumbled text.
Automating option 2, Print PDF>Adobe PDF>As image
File size is huge and quality is very poor.
Automating option 3, Print PDF>Microsoft Print to PDF
The output file size is massive and the output file is now portrait.
Automating option 4, Print PDF>PDF Creator
A free tool (purchase optional to remove ads/upgrades etc) which works fine when it works, but sometimes breaks when it congratulates you on the xth PDF you’ve created, or tries to upgrade etc, so not idea.
I can’t believe that in 2019 there’s not a way to just remove odd/even pages of a document, this isn’t rocket science Adobe…anyone have any experience here please?
I’m currently working on this process (which seems clunky), but it’s what I’m resorting to:
Count the number pages in PDF, create a counter up to number of pages, attach PDF window, for each count it iterates through (representing each page), ctrl+click on each page in the “page thumbnail” window, then when all even pages are selected, delete, save.
Surely there has to be a better way!?
I know it’s rude to bump, apologies, but has anyone here worked with splitting PDFs in UiPath and made it out alive? I feel about as safe as Chris Pratt in the raptor den…
Hi Alex have you found the solution? Thanks.
What we’re doing for this process now actually just changed last month due to a process change - but when printing to PDF using Chrome you don’t end up with the filesize issue and you can select alternating pages, so that seems to be acceptable for now. Sorry I can’t help more, there might be a library item for this though if it relates to PDFs you already have saved?
Hi @Alex_Cross ,
Not so sure, if this would be helpful now, But in the later versions of
UiPath.PDF.Activities we have had much upgrades and there are activities I believe which could do the Selection of particular pages based on Ranges mentioned.
A Combination of the Activities to be used would be the below :
Get PDF Page Count Activity
For Each and
Extract PDF Page Range Activity
Join PDF Files Activity(If required to Combine all the Extrated Odd Page files)
A Skeleton of the approach mentioned would be in the below way :
An Overview of the Activities provided by
@X_Chen , Maybe you could use this approach if you’re seeking for a similar solution. However, If your requirements do differ, we request you to create a Separate Topic so we can provide you individual help on the case.
Thanks for this very informative response! We actually changed our process to get around this (upon review it actually made sense to update the process, it wasn’t just to get around this), however I will pass this response around our wider CoE developers who may be encountering PDF issues.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.