We’re showing here how to create a simple workflow in PDF Automation Server that is watching a folder for incoming PDF files, extracting all the pages except for the last one into a new PDF and then saving that new PDF to a file.
![](https://kbdeveloper.qoppa.com/wp-content/uploads/Create_New_PDF_From_Extracted_Pages.png)
It’s a pretty simple flow that can be created by dragging only 3 nodes: Watch Folder, Extract Pages and Save to Files.
Watch Folder:
![](https://kbdeveloper.qoppa.com/wp-content/uploads/WatchFolder.png)
Extract Pages:
![](https://kbdeveloper.qoppa.com/wp-content/uploads/ExtractPageProperties.png)
Note that a formula is used when extracting the page that uses the number of page in the incoming PDF
1-$[format(pdf.pageCount, "####")-1|####")-1] |
The output of the Extract Pages Node is a PDF so you only need to save it to file.
Save File:
![](https://kbdeveloper.qoppa.com/wp-content/uploads/SaveToFile.png)