pypdf Questions

3

Solved

I have a function that gets a page from a PDF file via PyPDF2 and should convert the first page to a png (or jpg) with Pillow (PIL Fork) from PyPDF2 import PdfFileWriter, PdfFileReader import os fr...
Aldrin asked 11/3, 2017 at 9:27

9

When I use the following code from PyPDF2 import PdfFileMerger merge = PdfFileMerger() for newFile in nlst: merge.append(newFile) merge.write("newFile.pdf") Something happened as foll...
Taynatayra asked 29/7, 2017 at 14:50

3

Is it possible to exclude the contents of footers and headers of a page from a pdf file during extracting the text from it. As these contents are least important and almost redundant. Note: For ex...
Gismo asked 27/8, 2018 at 12:53

5

Solved

from typing import List from PyPDF2 import PdfFileReader from PyPDF2.generic import Destination def get_outlines(pdf_filepath: str) -> List[Destination]: """Get the bookmarks o...
Julee asked 30/11, 2011 at 16:52

8

Solved

I have been using camelot for our project, but since 2 days I got following errorMessage. When trying to run following code snippet: import camelot tables = camelot.read_pdf('C:\\Users\\user\\Downl...
Margie asked 28/12, 2022 at 11:35

5

I am struggling to compress my merged pdf's using the PyPDF2 module. this is my attempt based on http://www.blog.pythonlibrary.org/2012/07/11/pypdf2-the-new-fork-of-pypdf/ import PyPDF2 path = ope...
Isochronize asked 1/4, 2014 at 3:42

4

i try to update entry-fields in a pdf using the following code with the pytho-module pypdf. At first i read the pdf-files and get all available fields on this firt pdf-page. from pypdf import PdfRe...
Mares asked 31/7, 2023 at 11:28

6

Solved

I want to add a metadata key-value pair to the metadata of a pdf file. I found a several years old answer, but I think this is way to complicated. I guess there is an easier way today: https://sta...
Saltation asked 20/10, 2017 at 13:6

4

I am trying to strip out only the first page of multiple PDF files and combine into one file. (I receive 150 PDF files a day, the first page is the invoice which I need, the following three to 12 p...
Dicho asked 5/11, 2017 at 19:54

2

Solved

I'm currently generating a PDF with PyFPDF. I also need to add a vertical/rotated text. Unfortunately, it's not directly supported in PyPDF2 as far as I see. There are solutions for FPDF for PHP. I...
Groove asked 12/5, 2018 at 13:42

3

Solved

I have a folder containing a lot of sub-folders, with PDF files inside. It's a real mess to find information in these files, so I'm making a program to parse these folders and files, searching for ...
Bacchus asked 12/5, 2022 at 12:55

3

I am using python, and I want to combine two PDF pages into a single page. My purpose is to combine these two pages into one, not two PDFs. Is there any way to combine the two PDFs one by one? I do...
Illfavored asked 13/4, 2019 at 0:7

9

I have installed the pyPdf module successfully using the command pip install pydf but when I use the module using the import command I get the following error: enC:\Anaconda3\lib\site-packages\pyP...
Gillispie asked 9/2, 2017 at 7:19

2

Solved

My original goal was to remove the extensive white margins on my PDF pages. Then I found this purpose can be achieved by scaling the page using the code below, but annotations are not scaled. imp...
Sea asked 14/3, 2019 at 23:55

13

Solved

I have a large number of files, some of them are scanned images into PDF and some are full/partial text PDF. Is there a way to check these files to ensure that we are only processing files which ar...
Decoupage asked 16/4, 2019 at 8:54

5

Solved

I'm try to adding watermark to every pages of my PDF file.My PDF files have 58 pages but my output file has get only last page in my PDF file. This's my code: from PyPDF2 import PdfFileReader, Pd...
Svensen asked 8/6, 2020 at 11:46

6

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 s...
Ascospore asked 16/12, 2009 at 23:0

6

Solved

Recently I needed to install PyPdf2 to one of my programs using Anaconda. Unfortunately, I failed, but the URLs that was added to Anaconda environment prohibit the updates of all the Conda librarie...
Speedway asked 18/9, 2016 at 13:47

3

Solved

I'm editing a PDF file with pyPDF2. I managed to generate the PDF I want but I've yet to rotate some pages. I went to the documentation and found two methods: rotateClockwise and rotateCounterClock...
Irena asked 6/3, 2017 at 0:27

4

I'm using pyPdf to merge several PDF files into one. This works great, but I would also need to add a table of contents/outlines/bookmarks to the PDF file that is generated. pyPdf seems to have on...
Hinduism asked 27/5, 2011 at 20:38

3

Solved

I wanna split pdf file using PyPDF2. All examples in net is too difficult or don't work or always give error "AttributeError: 'PdfFileWriter' object has no attribute 'stream'" Can someone help wi...
Pizzeria asked 17/7, 2017 at 12:21

3

Solved

I'm trying to extract the text of a pdf within a given bounding rectangle. I understand there are tools for pdf scraping such as pdfminer, pypdf, and pdftotext. I've experimented with all 3, and so...
Waltz asked 9/4, 2019 at 0:26

3

Solved

I try to use PyPDF2 module in Python 3 but I can't display 'Page Size' property. I would like to know what the sheet of paper dimensions were before scanning to PDF file. Something like this: ...
Jellicoe asked 15/9, 2017 at 6:22

1

pypdf==3.11.0, like previous versions, returns text strings with the occasional inserted single space. But Windows Search and the "Find" in Adobe reader find the text unadulterated, and i...
Tameika asked 24/6, 2023 at 14:30

4

Solved

I'm using the PyPDF2 library for extracting text, images, page width and heights, annotations, and other attributes from pdf documents. However, the library has many bugs and issues and seems not t...
Arlynearlynne asked 31/7, 2020 at 22:15

© 2022 - 2025 — McMap. All rights reserved.