Posts Tagged ‘pdf’

[latex] using accents

February 22, 2019 Leave a comment

I wanted to write a LaTeX document in Hungarian using those funny accents (áéíóöőüű), but they didn’t appear in the PDF output.



The tip is from here.

Categories: latex Tags: , ,

[manjaro] convert refuses to produce PDFs

January 10, 2019 Leave a comment

Under Manjaro, I wanted to create a PDF from some JPG files. However, convert dropped an error:

$ convert *.jpg out.pdf
convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.

Edit the file /etc/ImageMagick-7/policy.xml and find the following line:

<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />

Put it between comments (<!-- and -->) and everything is good again.

I found this solution here.

Categories: bash, linux Tags: , , ,

You can open a markdown (.md) file in Okular

November 29, 2018 Leave a comment

Today I found out by accident that you can open a markdown file (.md) with okular. okular was just a PDF viewer for me. The .md file is nicely rendered and you can convert it to PDF or you can print it. Awesome!

Categories: linux Tags: , , , ,

Books for Professionals

January 5, 2018 Leave a comment

See Simply awesome! All books are free. The Python book is 700+ pages for instance.

Categories: book Tags: ,

How to convert a PDF to a “2 pages per sheet” PDF?

October 24, 2017 Leave a comment

Having a “1 page per sheet” PDF, how to convert it to a “2 pages per sheet” PDF?

I found the solution here. The answer is here. In short: install the package “pdfjam“, and use “pdfnup“, which is part of the package.

$ pdfnup input.pdf
Categories: bash Tags: , , ,

open PDF at a given page

December 3, 2015 Leave a comment

From the command line you want to open a PDF file at a given page.

My favourite PDF viewer was okular but I didn’t find this option. But evince supports it:

evince -p 200 ehh.pdf

Where “-p” means “page”.

Update (20180413)
Okular also has this feature and the option is the same:

okular -p 200 ehh.pdf
Categories: bash Tags: , , ,

autocompile LaTeX project when a file changes

November 19, 2014 Leave a comment

When I work with LaTeX, I always create a script called “” that compiles the project and produces a PDF. For viewing the PDF file I use okular since it refreshes automatically if the PDF changes. However, if I change the LaTeX source, I need to call the “” script manually. Could it be automated? That is, when I save the LaTeX source, the project should compile automatically, so I should only switch between my text editor and the PDF viewer.

I found a complete solution for the problem: It’s a demo script that is part of the pyinotify project.


./ . .tex,.bib ./

I put in the root folder of the LaTeX project, next to the script. The command above means the following: “monitor the current directory recursively. When a .tex or .bib file changes, call the script.”


Categories: python Tags: , , , ,

open links in okular with Firefox

July 10, 2014 Leave a comment

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?


  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

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.

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 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: , ,