Skip to content
Advertisement

Tag: pdf

Printing a file and configure printer settings

I’m trying to code a printer automation using Python on Windows, but can’t get it done. I’m not really understanding the topic and i’m a little surprised – a “simple” way to get this done doesn’t seem to exist..? There are so many APIs that allow to access common things in a nice and easy way, but printing seems to

How to convert webpage into PDF by using Python

I was finding solution to print webpage into local file PDF, using Python. one of the good solution is to use Qt, found here, https://bharatikunal.wordpress.com/2010/01/. It didn’t work at the beginning as I had problem with the installation of PyQt4 because it gave error messages such as ‘ImportError: No module named PyQt4.QtCore’, and ‘ImportError: No module named PyQt4.QtCore’. It was

Generating PDFs from SVG input

I am trying to generate a PDF from a SVG input file with Python in a Django application. I have already found 2 working solutions: cairo+rsvg and imagemagick but they both have one problem: They have some strange dependencies that I do not want to install on a server, for example DBUS and GTK. So I am asking for another

Parse annotations from a pdf

I want a python function that takes a pdf and returns a list of the text of the note annotations in the document. I have looked at python-poppler (https://code.launchpad.net/~poppler-python/poppler-python/trunk) but I can not figure out how to get it to give me anything useful. I found the get_annot_mapping method and modified the demo program provided to call it via self.current_page.get_annot_mapping(),

Cropping pages of a .pdf file

I was wondering if anyone had any experience in working programmatically with .pdf files. I have a .pdf file and I need to crop every page down to a certain size. After a quick Google search I found the pyPdf library for python but my experiments with it failed. When I changed the cropBox and trimBox attributes on a page

Advertisement