<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ghostscript on Michael’s Domain</title><link>https://jeltsch.org/en/tags/ghostscript/</link><description>Recent content in Ghostscript on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/ghostscript/index.xml" rel="self" type="application/rss+xml"/><item><title>Ḿanuscript reviewing by annotating PDFs</title><link>https://jeltsch.org/en/manuscript_reviewing_by_annotating_pdfs/</link><pubDate>Fri, 28 Jun 2019 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/manuscript_reviewing_by_annotating_pdfs/</guid><description>&lt;p&gt;Manuscripts for scientific peer-review are delivered as PDF files. Thus it appears most natural to comment the PDF file itself instead of submitting the comments as a separate text (file). However, many submission systems do not allow to submit comments in form of an annotated PDF file.In addition, there is no easy-to-use free/Open Source PDF editor for Linux (my platform of choice). Yes, there is PDFEdit (
 &lt;a href="http://pdfedit.cz/en/index.html%29" target="_blank" rel="noopener noreferrer nofollow"&gt;http://pdfedit.cz/en/index.html)&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
, but it requires substantial learning and its last release dates back to 2012. There are free online PDF editors (e.g. 
 &lt;a href="https://www.pdfescape.com/%29" target="_blank" rel="noopener noreferrer nofollow"&gt;https://www.pdfescape.com/)&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
, but sometimes I need a local tool. Although not Open Source and not free, the tool of my choice has been 
 &lt;a href="https://www.qoppa.com/pdfstudio/" target="_blank" rel="noopener noreferrer nofollow"&gt;PDF Studio Pro&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. It has all the features I need (actually much more than I need), it is truly cross-platform (Windows, Mac, Linux), easy to use and very affordable for what it offers ($129 single permanent license). Unfortunately, Quoppa software - the maker of PDF Studio - does not offer academic discounts.&lt;strong&gt;PDF Studio Viewer&lt;/strong&gt;A while ago, the makers of PDF Studio started to offer a free version called 
 &lt;a href="https://www.qoppa.com/pdfstudioviewer/download/" target="_blank" rel="noopener noreferrer nofollow"&gt;PDF Studio Viewer&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. This free version has gotten more useful over time. Since last year, it also supports PDF annotation, which is very important for my work, mostly when I am peer-reviewing scientific manuscripts. For many academic users, the PDF Studio Viewer might be fully sufficient.&lt;strong&gt;Libre Office and Inkscape&lt;/strong&gt;Of course Libre Office Draw and Inkscape can edit PDFs, but they are not specialized for annotating. If you need to do extensive annotations, the process becomes soon very painful. In addition, Inkscape editing can be destructive (i.e. when you modify text), but I have used it e.g. to fill out forms.Apart from the lack of dedicated annotation and reviewing tools (&amp;ldquo;markups&amp;rdquo; like &amp;ldquo;replace text&amp;rdquo;, &amp;ldquo;crossout text&amp;rdquo;, &amp;ldquo;delete text&amp;rdquo;, &amp;ldquo;insert text&amp;rdquo; or callouts), Libre Office Draw is actually a quite capable PDF editor, but fails still sometimes to correctly open very complex PDF documents (I have had problems with background images/patterns). Strangely, the only reviewing tool (comments) are not exported by default. You need to check the &amp;ldquo;Export comments&amp;rdquo; box when you export your edited PDF file as PDF (the &amp;ldquo;Save&amp;rdquo; operation creates an ODG file, which you probably don&amp;rsquo;t want).&lt;strong&gt;PDFsam&lt;/strong&gt;If you do not have the need to annotate, then you might get away with the Open Source tool 
 &lt;a href="https://sourceforge.net/projects/pdfsam/" target="_blank" rel="noopener noreferrer nofollow"&gt;PDFsam&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. Unlike PDFEdit, PDFsam is available from the Ubuntu repositories. PDFsam also has two non-free versions (
 &lt;a href="https://pdfsam.org/pdfsam-enhanced/" target="_blank" rel="noopener noreferrer nofollow"&gt;PDFsam Enhanced&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 and 
 &lt;a href="https://pdfsam.org/download-pdfsam-visual/" target="_blank" rel="noopener noreferrer nofollow"&gt;PDFsam Visual&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
). PDFsam Basic (the Open Source version) is just a simple GUI on top of some command line utilities, whereas the PDF Studio Viewer offers a true visual editing experience. I canot talk about the non-free versions of PDFsam as they are not available as free trials. In fact, all of the operations of PDFsam can be achieved via the command line (see here for my blog post about how to perform common PDF editing tasks using mostly the command line tool 
 &lt;a href="https://jeltsch.org/en/pdf/"&gt;pdftk&lt;/a&gt;
).&lt;strong&gt;Reducing file size&lt;/strong&gt;PDFsam Basic and PDF Studio Viewer do not offer any functionality to reduce file size. The LibreOffice Draw PDF export dialog let&amp;rsquo;s you reduce image resolution and JPEG compression, which you can use to reduce file size. But at the Open Source front, the only capable tools to reduce PDF size seem to be command line tools. I use 
 &lt;a href="https://www.ghostscript.com/" target="_blank" rel="noopener noreferrer nofollow"&gt;ghostscript&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 for this task, but the command is not easy to remember:&lt;code&gt;gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf&lt;/code&gt;With PDF Studio Pro, you obviously do not need to remember the different keywords for the different output quality option (screen, ebook, printer, prepress) as you just choose from the drop down menu between the available options. If you are looking for an Open Source graphical wrapper for ghostscript, perhaps try 
 &lt;a href="https://sourceforge.net/projects/workerpdf/" target="_blank" rel="noopener noreferrer nofollow"&gt;workerPdf&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. &lt;strong&gt;Signing documents and adding signatures&lt;/strong&gt;PDF Studio Viewer let&amp;rsquo;s you sign documents if you have a 
 &lt;a href="https://www.docusign.com/products-and-pricing" target="_blank" rel="noopener noreferrer nofollow"&gt;DocuSign subscription&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
. However, I am mostly concerned about being able to prove myself that I created a certain document (&amp;ldquo;self-signed signature&amp;rdquo;) and not that others are able to verify my authorship. For this scenario you are out of luck with PDF Studio Viewer. And apparently, PDFSam does not offer any possibility for signing (neither self-signing nor 3rd party signing). However, Libre Office Draw allows documents signing! I have been looking for an affordable solution (not self-signed, but trusted by other PDF readers) to sign PDF documents, but there seems to be no appropriate solution if you need to sign only rarely. The basic plan by DocuSign ($10/month) appears too expensive when signing only one document per month.&lt;strong&gt;Take-home message&lt;/strong&gt;If you want to stay with free or Open Source solutions, you probably need to combine several tools in order to cover all typical PDF editing tasks without pain: PDFsam Basic, LibreOffice Draw, PDF Studio Viewer and ghostscript. But if you edit PDFs often (as I do), buying PDF Studio Pro is clearly the way to go.&lt;/p&gt;</description></item><item><title>Some useful PDF editing (and search) commands</title><link>https://jeltsch.org/en/pdf/</link><pubDate>Thu, 28 Jul 2011 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/pdf/</guid><description>&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Insert pages with interleave:&lt;/strong&gt; pdftk A=input_odd_pages.pdf B=input_even_pages.pdf shuffle A B output collated.pdf(from the pdftk package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Split an A2-sized PDF into two A3 pages for printing (no overlap):&lt;/strong&gt; pdfposter -m A3 -p A2 Periodic-Table_A2.pdf Periodic-Table_2xA3.pdf&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Split an arbitrary-sized PDF into A3 pages for printing at 100% size (= 1), no overlap:&lt;/strong&gt; pdfposter -m A3 -s1 Poster.pdf Poster_split_to_A3.pdf&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reverse page order:&lt;/strong&gt; pdftk input.pdf cat end-1 output reversed.pdf(from the pdftk package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reduce PDF filesize:&lt;/strong&gt; gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf Allowed PDFSETTINGS are /screen, /ebook, /printer, /prepress, /default. (from the ghostscript package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Convert a color PDF into grayscale:&lt;/strong&gt; gs -sOutputFile=output.pdf -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray -dAutoRotatePages=/None -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH input.pdf (from the ghostscript package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Export bitmap images:&lt;/strong&gt; pdfimages -j original.pdf extracted (from the xpdf package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Convert into a bitmap image:&lt;/strong&gt; convert original.pdf converted.png (from the imagemagick package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Split into individual 1-page PDF files:&lt;/strong&gt; pdftk original.pdf burst (from the pdftk package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merge two or more PDF files:&lt;/strong&gt; pdftk original1.pdf original2.pdf cat output merged.pdf (from the pdftk package)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete page 13 from a PDF file:&lt;/strong&gt; pdftk original.pdf cat 1-12 14-end output page13deleted.pdf (from the pdftk package&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rotate page 5 of the PDF file 90 degrees counterclockwise:&lt;/strong&gt; pdftk Figures_LRES.pdf cat 1-4 5L 6-end output Figures_LRES2.pdf (from the pdftk package&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Assemble a new PDF where each 4 pages from the source files are merged into one landscape page:&lt;/strong&gt; pdfjam *.pdf &amp;ndash;landscape &amp;ndash;nup 2x2 For portrait orientation use the &amp;ldquo;&amp;ndash;no-landscape&amp;rdquo; option (from the pdfjam package).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Underlay a PDF with another (background) PDF:&lt;/strong&gt; pdftk foreground.pdf background background.pdf output overlay.pdf (from the pdftk package).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GUI PDF editors:&lt;/strong&gt; I tried out 
 &lt;a href="http://sourceforge.net/projects/pdfedit" target="_blank" rel="noopener noreferrer nofollow"&gt;PDFEdit&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
, but it is too difficult for me. The 
 &lt;a href="http://code-industry.net/pdfeditor.php" target="_blank" rel="noopener noreferrer nofollow"&gt;Master PDF Editor"&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
 is not free, but it seems to be much more usable without extensive initialization of the user.&lt;/li&gt;
&lt;li&gt;**Encrypt a PDF with both a owner password (to change the file) and a user password (to open the file): **pdftk input.pdf output encrypted.pdf owner_pw PROMPT user_pw PROMPT (from the pdftk package).&lt;/li&gt;
&lt;li&gt;**If you need to do a text search through many PDF files in the current directory and all of its subdirectories, you can use 
 &lt;a href="https://pdfgrep.org/" target="_blank" rel="noopener noreferrer nofollow"&gt;pdfgrep&amp;nbsp;






 
 
 
 &lt;svg class="svg-inline--fa fas fa-up-right-from-square fa-2xs" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 512 512" overflow="visible"&gt;&lt;use href="#fas-up-right-from-square"&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/a&gt;
: **pdfgrep -r searchterm * (from the pdfgrep package).&lt;/li&gt;
&lt;li&gt;**Convert &amp;amp; merge all jpg files in the current directory into one PDF file:**convert *.jpg pictures.pdfIn the recent Ubuntu editions, this batch operation is not allowed due to security risks and you can disable this policy by renaming the configuration file:/etc/ImageMagick-6$ sudo mv policy.xml policy.xmlout&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>