# Split multiple page PDF to individual pages

**URL:** <https://forum.knime.com/t/split-multiple-page-pdf-to-individual-pages/43734>\
**Category:** KNIME Extensions\
**Created:** [June 2, 2022, 6:22pm UTC](https://forum.knime.com/t/split-multiple-page-pdf-to-individual-pages/43734 "2022-06-02T18:22:30Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![takbb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/takbb/32/57077_2.png) [@takbb](https://forum.knime.com/u/takbb)\
**Post date:** [June 8, 2022, 11:42am UTC](https://forum.knime.com/t/split-multiple-page-pdf-to-individual-pages/43734/9 "2022-06-08T11:42:57Z")

</div>

Hi @srinibash1980 , I’m pleased it worked for you and thank you for marking the solution as that will help others find it.

Attached is an updated version demonstrating processing of all pdf files in a folder. It uses a loop and with each iteration adjusts the config of the pdf component using flow variables.

For demo here, I used the file name for each pdf as the basis for creating a new output folder, so the extracted pages for each file go into their own output folder. Obviously you can do that, or you can just leave the output folder alone on the component as before.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/5/5/55dc1486fc9990235a434107df5dea50a3c2c279.png)

I hope that gives you the ideas/help you need for your own use case.

[PDF Split using java with folder processing.knwf](https://forum.knime.com/uploads/short-url/8MeVmBRKwEOCCIMNPYEMTaUMhkF.knwf) (2.6 MB)

[EDIT - I should add the website reference that was the source of the information/java code used in writing this solution:

> **[Java Examples - Split PDF into Many](https://www.tutorialspoint.com/javaexamples/split_pdf_into_many.htm)**
>
> Java Examples - Split PDF into Many, How to split a PDF in to many using Java.

I adapted the code from there to place in the java snippet.

For this to work, it required two java .jar files:

1. pdfbox-2.0.26.jar
2. commons-logging-1.2.jar  
These are open source and were downloaded from:  
[Apache PDFBox | Download](https://pdfbox.apache.org/download.cgi)  
[Apache Commons Logging - Download Apache Commons Logging](https://commons.apache.org/proper/commons-logging/download_logging.cgi)

I created a folder inside the workflow folder itself called “java-classes”

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/4/44a4118dffd89440be520a6c92b42ddd69515fc2.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/f/8fe96b9774afd9f287ac0a5531309d965d25b481.png)

Then on the java snippet, I added these .jar files as additional libraries using the Add KNIME URL button so that I could add files contained _within_ the workflow folder:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/c/5/c5118dc00ec177d756b71aaaf2115cd1f0384284.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/4/8462342f6a107c269ca6ed3ad6ae90a4d60c25cb.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/6/4/64ee2875d7298aa463661ba8852c95469379edef.png)

Enjoy! 🙂

---

_[View the full topic](https://forum.knime.com/t/split-multiple-page-pdf-to-individual-pages/43734)._
