J-F-Liu / lopdf

A Rust library for PDF document manipulation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Request] Example of PDF Split

WCarrollSTO opened this issue · comments

Hello, thank you for the library! It has been quite useful for merging PDFs.

I was wondering if we could please have an example of splitting PDF Pages into individual Documents. I've tried writing my own, going by the "Merge" example, but I have had no luck.

If you mean going page by page, I've been using doc.delete_pages([1,2,4,5]) to return each page in turn by removing all others.