[Python] split a pdf based on outline

Discussão em 'Python' iniciado por Stack, Janeiro 28, 2025.

  1. Stack

    Stack Membro Participativo

    i would like to use pyPdf to split a pdf file based on the outline where each destination in the outline refers to a different page within the pdf.

    example outline:


    main --> points to page 1
    sect1 --> points to page 1
    sect2 --> points to page 15
    sect3 --> points to page 22


    it is easy within pyPdf to iterate over each page of the document or each destination in the document's outline; however, i cannot figure out how to get the page number where the destination points.

    does anybody know how to find the referencing page number for each destination in the outline?

    Continue reading...

Compartilhe esta Página