Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Add Page | Manipulating and Combining PDFs
Manipulating and Combining PDFs
course content

Contenido del Curso

Manipulating and Combining PDFs

bookAdd Page

add_page() is a PyPDF2 function that allows developers to add new pages to an existing PDF document. It's useful for creating reports, adding new content to an existing document, and modifying the structure of a PDF file. With add_page(), developers can automate the process of adding new pages to a PDF document in Python.

Let's add the first page from sample.pdf to a new file out.pdf and compress the page content in 2 times.

The sample.pdf content:

Tarea
test

Swipe to show code editor

  1. Read in a PDF called "sample.pdf";
  2. Select the page at index 0 and scale it by 0.5;
  3. Write the PDf to a file called "out.pdf".

The <out.pdf> file:

Mark tasks as Completed
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

add_page() is a PyPDF2 function that allows developers to add new pages to an existing PDF document. It's useful for creating reports, adding new content to an existing document, and modifying the structure of a PDF file. With add_page(), developers can automate the process of adding new pages to a PDF document in Python.

Let's add the first page from sample.pdf to a new file out.pdf and compress the page content in 2 times.

The sample.pdf content:

Tarea
test

Swipe to show code editor

  1. Read in a PDF called "sample.pdf";
  2. Select the page at index 0 and scale it by 0.5;
  3. Write the PDf to a file called "out.pdf".

The <out.pdf> file:

Mark tasks as Completed
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 1. Capítulo 6
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt