GNU Debian Linux – MuPDF the alternative PDF Viewer – how to create encrypted.pdf files that can be opened with Adobe Reader


Update: 2020-05


are important file formats for document exchange, but in 2020 PDF as Mail-Attachments can not be 100% trusted anymore.

how to create PDF under Linux?

there are various programs that support export to PDF format

least but not last GIMP.

Open an Image in GIMP, hit Ctrl+E for “export” and simply change the extensions from file.jpg or file.png to .pdf and it will export the picture into a file.pdf

for example take this picture:

GIMP will turn it into this pdf: 300px-Kuh_fliegt.svg.png.gimp.pdf

how to encrypt PDF under Linux?

once one created a PDF how to password protect/encrypt it? (so it is safe for mail transfer, password should be communicated by phone, so the receiving side also knows, that one is sending a document of importance and not a virus.pdf (that might also be encrypted).

# tested with
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-8-amd64
      Architecture: x86-64

su - root; # become root

# install software
apt update;
apt install qpdf;

# encrypt pdf with 128Bit AES

qpdf --verbose --encrypt test test 128 -- 300px-Kuh_fliegt.svg.png.gimp.pdf 300px-Kuh_fliegt.svg.png.gimp.128.aes.encrypted.pdf
qpdf: wrote file 300px-Kuh_fliegt.svg.png.gimp.128.aes.encrypted.pdf

# result file: 300px-Kuh_fliegt.svg.png.gimp.128.aes.encrypted.pdf

# encrypt pdf with 256Bit AES (more secure but Atril PDF Viewer for example has problems opening it)
# but mupdf can open it
qpdf --verbose --encrypt test test 256 -- 300px-Kuh_fliegt.svg.png.gimp.pdf 300px-Kuh_fliegt.svg.png.gimp.256.aes.encrypted.pdf
qpdf: wrote file 300px-Kuh_fliegt.svg.png.gimp.256.aes.encrypted.pdf

# result file: 300px-Kuh_fliegt.svg.png.gimp.256.aes.encrypted.pdf

how to View PDFs under Linux?

command line style:

# open in mupdf
mupdf -p test 300px-Kuh_fliegt.svg.png.gimp.256.aes.encrypted.pdf

screenshot of MuPDF, can open 256Bit encrypted.pdf 🙂 NICE! (but have to start it from command line)

a a very nice PDF viewer comes with Gnome2 MATE Desktop:



Problem: both Atril and Evince actually have (currently) problems opening 256Bit AES encrypted.pdf (128Bit works fine)

firefox 76.0 (64-bit) can open even encrypted pdf! nice! 🙂

is it windows compatible?


windows test: both files were successfully opened/decrypted on Win10 + Adobe Reader XI (latest as writing of this blog)



poppler-utils/stable,now 0.71.0-5 amd64 [installed,automatic]
PDF utilities (based on Poppler)

MuPDF: the alternative PDF Viewer

there is even an App:

that does a great job on ebooks in epub format as well

but for PDF would recommend

# tested under 
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-8-amd64
      Architecture: x86-64

su - root; # become root
apt update;
apt install mupdf;

# command line terminal options/help
usage: mupdf [options] file.pdf [page]
	-p -	password
	-r -	resolution
	-A -	set anti-aliasing quality in bits (0=off, 8=best)
	-C -	RRGGBB (tint color in hexadecimal syntax)
	-W -	page width for EPUB layout
	-H -	page height for EPUB layout
	-I -	invert colors
	-S -	font size for EPUB layout
	-U -	user style sheet for EPUB layout
	-X	disable document styles for EPUB layout

the manpage:

mupdf is a pretty minimalistic pdf viewer: mupdf document viewer - with minimalistic interface made and donated to GPL by it not even has a menu bar?

apt-get install mupdf

a lightweight PDF and XPS viewer

The renderer in MuPDF is tailored for high quality anti-aliased graphics. It renders text with metrics and spacing accurate to within fractions of a pixel for the highest fidelity in reproducing the look of a printed page on screen.

MuPDF is also small, fast, and yet complete. It supports PDF 1.7 with transparency, encryption, hyperlinks, annotations, searching and more. It also reads XPS and OpenXPS documents. MuPDF is written modularly, so features can be added on by integrators if they so desire.

Since the 1.2 release of MuPDF, we have optional support for interactive features such as form filling, javascript and transitions.


MuPDF is free software: you can redistribute it and/or modify it under the terms of the Affero GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MuPDF is Copyright 2006-2013 Artifex Software, Inc.

For commercial licensing please contact


Download packages of the latest release for your system:

The latest development source is available directly from the git repository:

git clone –recursive git://


The MuPDF developers hang out on IRC in the #ghostscript channel on

About Artifex Software Inc.

Artifex Software Inc. is the exclusive licensing agent for the highly regarded Artifex Ghostscript® PDF, PostScript, XPS, and PCL interpreter technologies. Ghostscript software began in 1988 as a freely available alternative to Adobe’s PostScript products and is now widely recognized as a premiere independent implementation of all the leading page description languages. Artifex also developed and distributes the high-performance PDF and XPS rendering engine “MuPDF”. In 2014 Artifex acquired the highly acclaimed SmartOffice MS Office mobile application.

Leader in Open Technologies

Known for its unique open architecture, availability of source code, responsive support and portability across an enormous range of CPU’s, operating systems and output devices, Ghostscript and MuPDF software have long been considered some of the best pieces of freely available software on the Net.

Serving Industry Leaders Worldwide

The growing number of Artifex’s licensees worldwide is testament to our successful application of these technologies in the commercial arena. Our clients include such industry leaders as Adobe Systems Inc., two divisions of Hewlett Packard, IBM, Konica-Minolta, Kyocera and Xerox. In addition, we have highlighted a few of our OEM customers under the “Partner Solutions” links on our home page.

Demonstrated Reliability and Performance

We’ve earned the confidence of our OEM customers through demonstrated reliability and highly competitive results on performance benchmarks. Each generation of Artifex’s technologies reaches maturity through an exhaustive suite of regression tests. Before release to customers, Artifex’s products are validated with the demanding Quality Logic conformance test suites (the de facto industry compatibility standard).

Expert, Responsive Customer Support

The foundation of Artifex’s technical excellence is our experienced team of design engineers and QA experts. Our staff includes the most senior PDF, PostScript, XPS, PCL, and color science technologists in the industry. They provide responsive support for our existing technologies, as well as the expertise to extend those capabilities both as a part of our continuous product improvement process and by targeted development projects in response to specific customer needs.

Committed to Current and Emerging Technologies

As a technology provider, Artifex Software Inc. is committed to offering complete and independent implementations of all the commercially important high-level PDL’s for the printing and document processing industry. With SmartOffice, Artifex customers can now view, edit, create, convert and print MS Office files. Artifex Software Inc. is continually expanding its array of interpreter and technology offerings to meet the current and emerging needs of our OEM customers.

Artifex’s Track Record

Artifex Software Inc. began in 1993 as the exclusive commercial licensing agent for the Ghostscript. Ghostscript software was the first independent implementation of PDF and PCLXL. With an increasing presence in both host-based and embedded applications, Ghostscript technologies set the pace for PostScript, PDF, PCL5, PCLXL and XPS.

Open Technology

In support of the concept of open technology, Ghostscript software was created as a fully functional, cross-platform PDF, PostScript, PCL, and XPS interpreter with source code availability. Originally distributed as a freely available end-user package, Ghostscript software became highly sought after by OEMs who wanted to license it for their own products. Thus, Artifex was created to facilitate transfer of freely available software to commercial licensing applications. In keeping with Artifex’s open source tradition, we also provide MuPDF under the open source AGPL license.

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!