Some test text!

Loading...
Guides
Split pages

Split PDF pages in Go

To split a PDF document into multiple pages.

doc := NewPDFDoc(filename)
pageNum = doc.GetPageCount()
for i := 1; i <= pageNum; i ++ {
    newDoc.InsertPages(0, doc, i, i, PDFDocE_none)
    newDoc.Save(outputPath + "_split_page_" + i + ".pdf", uint(SDFDocE_linearized))
    newDoc.Close()
}

Merge, Copy, Delete, and Rearrange PDF Pages
Full code sample which illustrates how to copy pages from one document to another, how to delete, and rearrange pages and how to use ImportPages().

Get the answers you need: Support

UPCOMING WEBINAR: "2021 in review: Top five new & updated features" Dec 9th @ 11am PT