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: Customer Experience and Retaining Control: Boosting Document Automation and Efficiency in Financial Services | Sept 15, 2022 at 11 am PT

PDFTron SDK

The Platform

NEW

© 2022 PDFTron Systems Inc. All rights reserved.

Privacy

Terms of Use