All posts tagged: pdf

How to shrink a scanned PDF on Linux

Leave a comment
Howtos

When you want to reduce the file size of a PDF document, this quick command using convert will shrink the original PDF file. This command is particularly useful against scanned documents, the jpeg quality will be 60% for 150dpi. Converting an original 300dpi / color PDF to a 150dpi, greyscale PDF can reduce file size up to 50%. There will be some quality loss but in this way you can reduce file size enough to […]

Create nice unicode PDF using Python

Leave a comment
Coding / Howtos / Python

Today I started one of the less motivating activities in Python 2.x: encoding. In Python 3 unicode will be everywhere, but as of the 2.6 version I’ve on one of the server I have to endure. Objective: get data from a UTF-8 encoded json and print a nice PDF. Tools: json, urllib2, fpdf, cgi What you need: pyfpdf: https://code.google.com/p/pyfpdf/downloads/list Download fpdf-1.7.hg.zip or more recent Unzip, enter the directory and python setup.py install locate fpdf cd /usr/lib/python2.6/site-packages/fpdf (or the directory […]

Create nice pdf with ps2pdf and any word processing utility

Leave a comment
Howtos

Apply on: any GNU/Linux distrubution Applications like OpenOffice allow to export document in the PDF format. However, sometimes the result is not very much professional. To obtain the best from your document in printing, you can follow a two-step conversion using any word processing utility. Use the option “Print to file” to convert your document to PostScript format. (i.e. my_document.ps) Convert the generated PostScript file in PDF using ps2pdf Conversion tips: To generate a document […]