Delete pages Version 1 (Net)

Action group: PDF 


Description

The action deletes the set range of pages from the PDF-document

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with a PDF document.Robin.PDFPDF contextYes
File nameFile name of PDF document with deleted pages. If the field is left empty, the name of the original file will be used.Robin.String
No
Folder pathPath to folder where PDF document file with deleted pages will be saved. If the field remains empty, the file will be saved in the original folder.Robin.FolderPathC:\doc\imgNo
OverwriteIf the value is "true" and a PDF document with the same name exists in the specified folder, the new file will overwrite it. If "false", the document will not be overwritten and the action will return an error.Robin.BooleantrueNo
Page rangeRange of pages to be removed from PDF document. The page range can be one or two numbers with a "-", with the second number being larger than the first. Example of filling: "1-5" or "6".Robin.String
Yes
Results
ResultPath to PDF document file with deleted pages.Robin.FilePath

Special conditions of use

  1. If non-existent pages are specified in the range parameters, the action will remove pages from the first specified page to the last page of the document.
    1. Example: A document has 20 pages. The set range: "15-30". The action will delete pages 15 through 20.
  2. You cannot delete all pages from the PDF-document - the action will return an error.

Example of use

Task

You have a PDF-file with five pages:

Delete the first two pages, change file name to "New PDF", and save it to a different folder.

Solution

Use the "Open PDF", "Delete pages" actions.

Implementation

  1. Assemble a robot scheme with the actions:


  2. Set the "Open PDF" action parameters.


  3. Set the "Delete pages" action parameters.


  4. Start the robot by clicking "Start" in the top panel.

Result

The program robot completed successfully. The file name and path were changed.

The first two pages were deleted from the file:

  • Нет меток