# Split PDF by Bookmarks, Export to folder

**URL:** <https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126>\
**Category:** PowerShell Help\
**Created:** [August 3, 2017, 12:19pm UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126 "2017-08-03T12:19:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott-kailey](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scott-kailey](https://forums.powershell.org/u/scott-kailey)\
**Post date:** [August 3, 2017, 12:19pm UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126/1 "2017-08-03T12:19:34Z")

</div>

Hello everyone,

I have a huge project I need to turn around pretty quickly. I am hoping there is a powershell solution for it.

I have over 40,000 pdf files, each with about 500 pages. I need to be able to look at each of those 40k files and split them up at the top bookmark level. After split, I need to name the split files the same as the bookmark names, however, I need to tag those names with a number that is included in the file name of the original pdf. After that, I need to export the new individual files to a folder specifically for that particular original file. I would then need to move to the next file and do the same thing for the remainder of the 40,000 files.

Is there any way to do this with powershell? I have found some things regarding adobe and javascript, but I am not sure I have time to learn that because none of it was very clear to me.

Any help would be greatly appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [August 3, 2017, 12:21pm UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126/2 "2017-08-03T12:21:24Z")

</div>

Nothing native in PowerShell, no; you’d need to acquire a library that knows how to crack open a PDF and understand the contents. It’d be as easy in PowerShell as in any other language; it’s the library you end up using that imposes whatever complexity there is. I don’t have a particular library to recommend, though, and many better ones are commercial.

---

<div class="post-metadata">

**Author:** ![scott-kailey](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scott-kailey](https://forums.powershell.org/u/scott-kailey)\
**Post date:** [August 3, 2017, 12:33pm UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126/3 "2017-08-03T12:33:52Z")

</div>

Thanks, Don. I was afraid of that. Something I will have to explore down the road.

---

<div class="post-metadata">

**Author:** ![simbrook](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@simbrook](https://forums.powershell.org/u/simbrook)\
**Post date:** [August 4, 2017, 4:17am UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126/4 "2017-08-04T04:17:17Z")

</div>

This may be of help

[https://social.technet.microsoft.com/Forums/office/en-US/1268809d-5dc6-4cd2-a97f-a26bc3ae3a8b/using-powershell-to-parse-a-pdf-file?forum=ITCG](https://social.technet.microsoft.com/Forums/office/en-US/1268809d-5dc6-4cd2-a97f-a26bc3ae3a8b/using-powershell-to-parse-a-pdf-file?forum=ITCG)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:37pm UTC](https://forums.powershell.org/t/split-pdf-by-bookmarks-export-to-folder/9126/5 "2024-05-16T20:37:47Z")

</div>

Closed on May 16, 2024, 8:37pm UTC


