Questions tagged [pdfrw]

pdfrw is a pure-Python library that reads and writes PDF files

pdfrw is developed on github, and installable from PyPI. It works with Python 2 and 3, and has an extensive set of examples.

80 questions
0
votes
0 answers

Using Python PDFRW - creating fillable pdf Need wrapped text. Multi-line changing to scrolling from code

I am creating a fillable pdf using python/pdfrw and fillpdfs. I originally had issues with fields not appearing, but found solutions to that. Now I have the issue of a text box not wrapping text. But it's odd. I set the pdf up front to Multi-line,…
0
votes
0 answers

I am trying to get some data out of some invoices the format is pdf the pdf uses an Xref table and the data is stored in these Indirect objects

I am trying to get some data out of a pdf I am using python library PyPDF 2 but the information I want is stored in an Xref table.How can I get specific information from the Xref table How can I get the data of a Xref table and How can I see the…
0
votes
1 answer

How to add a link with python in one pdf to another pdf?

I am trying to find a function that adds a link in a pdf page to another pdf page. I have already tried to use: addLink(pagenum, pagedest, rect, border=None, fit='/Fit', *args) from pyPDF2, but it allows only an internal link (in the same…
0
votes
0 answers

Unexpected problem with checkbox when filling a PDF form with pdfrw

I'm facing the following problem when I add the following AcroForm option template_pdf.Root.AcroForm.update(pdfrw.PdfDict(NeedAppearances=pdfrw.PdfObject('true'))) The text will show fine on the form but the checkmark does not show, the following…
0
votes
1 answer

How to convert PDF web links to file open actions with python pdfrw library

I'm using pdfkit to convert html to pdf which works great, but the external links in the pdf are web links. The pdf viewer that we are using does not recognize the pdf web links, but file open actions do work. I've been trying to change the pdf link…
jbellar
  • 3
  • 2
0
votes
2 answers

How can I merge two PDF files without overlapping content

Using another stackoverflow question & answer, I was able to locate code which partially resolves what I am trying to do Merge PDF files. However, this modified code results in the contents of two PDFs overlapping each outer. I am trying to stack…
Lee_Str
  • 3,266
  • 2
  • 21
  • 32
0
votes
1 answer

I tried To fill a pdf form by python but it's not workin

So Im trying to fill a pdf form using a Sqlite database in python , but nothing happened the output file is empty. Here it is my code (Please if i did write anything incorrect or i missing something please don't hesitate talking about it ) : import…
0
votes
1 answer

How to check a checkbox and a radio button in a PDF with Python?

I need to use Python to fill a complete PDF file, But I've been searching for 8 hours now and all I could find is how to fill a text field in a PDF file only. I need to fill check checkboxes and also use radio buttons where you can check one but not…
0
votes
1 answer

Read pdf file from downloads directory with python using pdfrw library

I want to manipulate pdf file using PDFRW library, so when I try to get the source of the pdf file I can't get the file and read it so please help. from pdfrw import pdfreader import os import pathlib pdf_file =…
0
votes
0 answers

Can't Move / Delete PDF after processing with pdfrw

I've updated the question to contain the bulk of the code as I feel there may be some of it that is blocking each other... Can be tested by simply adding a pdf file or two to your c:\temp folder (on windows). I've just started with Python so may be…
Spiffo
  • 3
  • 4
0
votes
1 answer

Pyinstaller does not create functional executable with pdfrw

I'm trying to create an executable file using pyinstaller, but it crashes immediately upon launching that executable. It should be noted that the program works perfectly fine inside of PyCharm. I've narrowed it down to only one line of code that…
0
votes
1 answer

Reading a PDF form file and returning fill-able field co-ordinates and field name

I have a PDF file which is essentially a form. I need to return the fill-able places; what fields to fill,their page number and their co-ordinates where I can place a bounding box.  I have followed various approach to handle the problem but as it…
Strayhorn
  • 687
  • 6
  • 16
0
votes
2 answers

How to convert an excel sheet to a pdf using python?

I have an excel sheet which i want to convert to Python. Need recommendation in suggesting package or a module for above query. i have tried with PDFWriter. I am using pandas to read my excel file and inputing that dataset to PDFwriter to create pdf…
Ketan
  • 1
  • 1
  • 1
  • 2
0
votes
1 answer

How do you auto-check a checkbox or radio-button on a fillable pdf, using pdfrw or some other python tool such as pypdf?

While using pdfrw, I am able to update all of the text fields on the fillable pdf, with no issue. (This is done using the pdfDict class within pdfrw. However, I am not able to check the checkboxes or radio buttons, via any dict value that I have…
wmoskal
  • 295
  • 1
  • 4
  • 15
0
votes
1 answer

add custom metadata to pdf using python

I want to add custom metadata to pdf file. This can be achieved by pypdf2 or pdrw library. I have referred Change metadata of pdf file with pypdf2 solution works fine, when there is no space between the two words of attribute. In my case my metadata…
Nitesh Selkari
  • 67
  • 1
  • 2
  • 8