Archive

Posts Tagged ‘pdf’

open links in okular with Firefox

July 10, 2014 Leave a comment

Problem
You have a PDF that contains links. You click on a link but it opens in a strange browser (Konqueror?). How to open links with Firefox?

Solution

  1. Run the command “kcmshell4 filetypes“. File Associations – KDE Control Module will open.
  2. Search for html and select the file type text/html.
  3. Move the application name you want to be a default for html in the “Application Preference Order” to the top.

I copied this solution from here. Credits go to djhurio.

Categories: ubuntu Tags: , , ,

how to create and print a booklet

Problem
I wanted to print a booklet, i.e. “print a document two pages at a time ordered in a way that folding the whole printout would produce a booklet, half the size of the paper which could be stapled in the middle.”

How to do it? Adobe Reader can do this but I had no luck. It seemed that it created the booklet correctly but when I printed it, the pages were flipped on the long side instead of the short side, so the result landed in the dustbin.

Solution
There is a nice little software called PdfBooklet that can create a booklet PDF that you can then print. Just open the original PDF in PdfBooklet, make sure that the ordering is OK (it should be), then click on the “Go” button to create a new booklet PDF. PdfBooklet didn’t show all the pages correctly in its view pane but the produced output was OK.

Tip from here.

Categories: ubuntu Tags: , , ,

Install Adobe Reader on Ubuntu 13.10+

If you use Ubuntu 13.10+, you won’t find Adobe Reader in the Software Center. Instead, download the .deb file from http://get.adobe.com/reader/otherversions/ and install it. In my case it complained about the state of the package but I chose “install anyway”.

The easiest way is to open the downloaded .deb package with the Software Center. First I tried to install it from .tar.gz, but when I tried to launch it, it didn’t find some library.

More details here.

If you have some missing dependencies when you try to launch it, refer to this thread.

Categories: ubuntu Tags: , ,

Online Convert(er)

January 27, 2013 Leave a comment

http://www.online-convert.com/

I wanted to convert a PDF with Calibre but it failed. I tried with Online Convert(er) too and it succeeded…

Categories: Uncategorized Tags: , , , ,

Add page numbers to a PDF file (with Adobe Acrobat 8 Pro)

January 10, 2013 Leave a comment

Problem
I had a bunch of PDF files that I merged together into one single PDF. I wanted to add page numbers to this PDF.

Solution
Well, here I used a proprietary software to get the job done quickly. With Adobe Acrobat 8 Pro these are the steps: Document -> Header & Footer -> Add…. Then add the page number. More info here.

If you have a solution with an open source software, let me know.

Gimp Magazine

December 7, 2012 Leave a comment

gimpmagGimp Magazine is out! Check it!

Download links:

I read about it @hup (in Hungarian).

Categories: gimp Tags: ,

Remove some parts of a PDF file

September 26, 2012 Leave a comment

Problem
You have a PDF file and you want to remove some parts of it, for instance the page numbers.

Solution
Use the program “pdfedit”. Select the object to be removed and press Del. That’s all :) At the end save the PDF.

Categories: Uncategorized Tags: ,

The unprintable PDF file

September 24, 2012 Leave a comment

Problem
I’ve been trying to print a PDF file for a week :) We have a network printer here that requires authentication when a print job is sent. Everything seems to be fine but nothing comes out of the printer. First I thought the file was too big, so I tried to send it in two pieces. Nothing. Send it in smaller pieces. Still nothing. Did the admins block me? But I can print other things. What’s going on?

Solution
Well, there must have been a problem with the PDF file itself. I could open it, browse it, but for some unknown reason the printer didn’t eat it. Here is the trick that worked for me:

pdftops die.pdf
# produces die.ps
mv die.pdf die.pdf.bak
pstopdf die.ps
# produces a correct die.pdf file

The new PDF file caused no problems.

Categories: bash Tags: , , ,

Extract images from PDF

December 14, 2011 Leave a comment
pdfimages -j foo.pdf  bar

Extract all images from foo.pdf, save them in JPG format (-j), and rename them to bar-001.jpg, bar-002.jpg, etc.

This tip is from here.

Categories: Uncategorized Tags: ,

Resize .tif file and convert to .jpg

November 7, 2011 Leave a comment

Use case
In the lab we have a photocopier that can scan too. Quite cool, you can precise your email address and it sends you the scanned page in .tif format.

However, pages must be scanned one by one and each of them is sent as a separate .tif file. Each .tif file is around 2.8 MB large with a resolution of 4900 x 7000 pixels. How to resize them and convert them to .jpg files? Gimp is one way but could we solve it in command-line?

Solution
Put the .tif files in a folder and create a subfolder called “out”. This way the output won’t be mixed with the input.

for i in *.tif; do echo $i; convert $i -resize 24% out/`basename $i .tif`.jpg; done

Each .tif is made smaller (width around 1200 pixels) and converted to .jpg.

As a final touch, convert the JPGs to a PDF file.

cd out
convert *.jpg doc.pdf

Question
Does anyone know how to to resize an image the following way: let width be 1200 pixels and keep the aspect ratio? Above the 24% was the result of a manual computation…

Answer: just use “convert -resize 1200 in.tif out.jpg“. The output will have width=1200 pixels with the same ratio as the input image. (Thanks Yves for the tip.)

Follow

Get every new post delivered to your Inbox.

Join 71 other followers