jsvine / pdfplumber

Plumb a PDF for detailed information about each char, rectangle, line, et cetera — and easily extract text and tables.
MIT License
6.02k stars 619 forks source link

Possible to output to new pdf #1021

Closed yezhengli-Mr9 closed 8 months ago

yezhengli-Mr9 commented 8 months ago

Please describe, in as much detail as possible, your proposal and how it would improve your experience with pdfplumber. Possible to output to new pdf? For example, raw pdf was disallowed to "copy" texts but expect to

with pdfplumber.open(pdf_file_path) as pdf:
    for page_number in range(len(pdf.pages)):
        page = pdf.pages[page_number]

then output new pdf that allow to "copy" texts.

jsvine commented 8 months ago

Hi @yezhengli-Mr9; pdfplumber does not perform PDF generation. You might be interested in the other libraries mentioned here, some of which do support PDF generation: https://github.com/jsvine/pdfplumber#comparison-to-other-libraries