<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PDF on Solarized Sublime Sekai</title>
    <link>https://vincenttam.gitlab.io/tags/pdf/</link>
    <description>Recent content in PDF on Solarized Sublime Sekai</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 19 Aug 2025 21:53:44 +0200</lastBuildDate>
    <atom:link href="https://vincenttam.gitlab.io/tags/pdf/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Merge Two PDF to Single Encrypted PDF</title>
      <link>https://vincenttam.gitlab.io/post/2023-03-15-merge-two-pdf-to-single-encrypted-pdf/</link>
      <pubDate>Wed, 15 Mar 2023 17:47:14 +0100</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2023-03-15-merge-two-pdf-to-single-encrypted-pdf/</guid>
      <description>&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;I have unprotected&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;code&gt;input1.pdf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;input2.pdf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;and I want to create one single &lt;code&gt;encrypted.pdf&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;my-try&#34;&gt;My try&lt;/h3&gt;&#xA;&lt;p&gt;I looked up &lt;a href=&#34;https://qpdf.readthedocs.io/en/stable/cli.html#page-selection&#34;&gt;QPDF&amp;rsquo;s manual&lt;/a&gt; and tried the following command.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;qpdf --empty --pages input{1,2}.pdf --encrypt upw opw 256 -- encrypted.pdf&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;but I got this error.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;qpdf: unrecognized argument --encrypt (pages options must be terminated with --)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;For help:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  qpdf --help=usage       usage information&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  qpdf --help=topic       help on a topic&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  qpdf --help=--option    help on an option&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  qpdf --help             general help and a topic list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;solution&#34;&gt;Solution&lt;/h3&gt;&#xA;&lt;p&gt;The sentence inside the parentheses says it all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Encrypt PDF on Command Line</title>
      <link>https://vincenttam.gitlab.io/post/2023-03-04-encrypt-pdf-on-command-line/</link>
      <pubDate>Sat, 04 Mar 2023 14:45:05 +0100</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2023-03-04-encrypt-pdf-on-command-line/</guid>
      <description>&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;&#xA;&lt;p&gt;On M$ Win*, I don&amp;rsquo;t have dedicated PDF readers like &lt;a href=&#34;https://www.adobe.com/acrobat/pdf-reader.html&#34;&gt;Adobe&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;During visioconference, one might want to share some downloaded PDFs.  Those&#xA;documents can be part of an ebook or notes.  In some situations, they can&#xA;provide context to a discussion.&lt;/p&gt;&#xA;&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Under the same folder, you might have&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;downloaded_ebook.pdf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;personal_info.pdf&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;other_personal_stuff.pdf&lt;/code&gt; that you don&amp;rsquo;t want to expose while streaming.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;However, each downloaded PDF usually comes with a name set by others.  It can be&#xA;tedious to rename them according to your own habits.  To protect users&amp;rsquo; privacy,&#xA;we can&lt;/p&gt;</description>
    </item>
    <item>
      <title>PDF Form Printing Error</title>
      <link>https://vincenttam.gitlab.io/post/2018-09-16-pdf-form-printing-error/</link>
      <pubDate>Sun, 16 Sep 2018 01:57:12 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2018-09-16-pdf-form-printing-error/</guid>
      <description>&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;&#xA;&#xA;&lt;link rel=&#34;stylesheet&#34; href=&#34;https://vincenttam.gitlab.io/css/hugo-easy-gallery.css&#34; /&gt;&#xA;&lt;div class=&#34;box&#34; &gt;&#xA;  &lt;figure  itemprop=&#34;associatedMedia&#34; itemscope itemtype=&#34;http://schema.org/ImageObject&#34;&gt;&#xA;    &lt;div class=&#34;img&#34;&gt;&#xA;      &lt;img itemprop=&#34;thumbnail&#34; src=&#34;https://vincenttam.gitlab.io/post/2018-07-23-fujitsu-lh532-keyboard-cleaning/marais-small.jpg&#34; alt=&#34;Le Temple du Marais&#34;/&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;a href=&#34;https://vincenttam.gitlab.io/post/2018-07-23-fujitsu-lh532-keyboard-cleaning/20180711_215200.jpg&#34; itemprop=&#34;contentUrl&#34;&gt;&lt;/a&gt;&#xA;      &lt;figcaption&gt;&lt;h4&gt;Le Temple du Marais&lt;/h4&gt;&#xA;          &lt;p&gt;&amp;#34;Eglise verte&amp;#34; means &amp;#34;green church&amp;#34;.&lt;/p&gt;&#xA;      &lt;/figcaption&gt;&#xA;  &lt;/figure&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;My churches are going &lt;span class=&#34;green&#34;&gt;green&lt;/span&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;problem&#34;&gt;Problem&lt;/h3&gt;&#xA;&lt;p&gt;&lt;i class=&#34;fas fa-download fa-fw&#34; aria-hidden&gt;&lt;/i&gt;&#xA;&lt;i class=&#34;far fa-file-pdf fa-fw&#34; aria-hidden&gt;&lt;/i&gt;&#xA;&lt;i class=&#34;far fa-save fa-fw&#34; aria-hidden&gt;&lt;/i&gt; →&#xA;&lt;i class=&#34;fab fa-usb fa-fw&#34; aria-hidden&gt;&lt;/i&gt;&#xA;&lt;i class=&#34;fas fa-print fa-fw&#34; aria-hidden&gt;&lt;/i&gt;&#xA;I downloaded &lt;a href=&#34;https://web.archive.org/web/20180517065538/http://www.haute-garonne.gouv.fr/content/download/25422/176183/file/FormulaireEtudiantsEtrangers.pdf&#34;&gt;a PDF&lt;/a&gt; from Haute-Garonne&amp;rsquo;s government site, filled in&#xA;the form and saved it on a USB key. Then I printed it at a Konica Minolta bizhub&#xA;photocopier &lt;time datetime=&#34;2018-09-15 17:00&#34;&gt;yesterday&lt;/time&gt;.&lt;/p&gt;&#xA;&lt;span class=&#34;fa-stack fa-2x fa-pull-left&#34;&gt;&#xA;  &lt;i class=&#34;fas fa-language fa-stack-1x&#34;&gt;&lt;/i&gt;&#xA;  &lt;i class=&#34;fas fa-ban fa-stack-2x red&#34;&gt;&lt;/i&gt;&#xA;&lt;/span&gt;&#xA;However, _only_ the radio buttons &lt;input type=&#34;radio&#34;&gt; and checkboxes&#xA;&lt;input type=&#34;checkbox&#34;&gt; were printed.  The blanks &lt;input type=&#34;text&#34; readonly&gt;&#xA;were left _blank_!  I opened my PDF and double-checked that I had input the text&#xA;in &lt;input type=&#34;text&#34; value=&#34;all text fields&#34; readonly&gt;.&#xA;&#xA;&#xA;&lt;div class=&#34;box&#34; &gt;&#xA;  &lt;figure  itemprop=&#34;associatedMedia&#34; itemscope itemtype=&#34;http://schema.org/ImageObject&#34;&gt;&#xA;    &lt;div class=&#34;img&#34;&gt;&#xA;      &lt;img itemprop=&#34;thumbnail&#34; src=&#34;prerr-s.jpg&#34; alt=&#34;PDF file printed&#34;/&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;a href=&#34;prerr.jpg&#34; itemprop=&#34;contentUrl&#34;&gt;&lt;/a&gt;&#xA;      &lt;figcaption&gt;&lt;h4&gt;Printed output&lt;/h4&gt;&#xA;          &lt;p&gt;Printed by a Konica Monilta bizhub photocopier&lt;/p&gt;</description>
    </item>
    <item>
      <title>Combine PDF in Linux</title>
      <link>https://vincenttam.gitlab.io/post/2018-07-13-combine-pdf-in-linux/</link>
      <pubDate>Fri, 13 Jul 2018 17:30:54 +0200</pubDate>
      <guid>https://vincenttam.gitlab.io/post/2018-07-13-combine-pdf-in-linux/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://manpages.ubuntu.com/manpages/trusty/man1/pdfunite.1.html&#34;&gt;pdfunite&lt;/a&gt; is fairly easy to use.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pdfunite PDF-sourcefile1..PDF-sourcefilen PDF-destfile&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Another way is to use &lt;a href=&#34;https://qpdf.sourceforge.net/&#34;&gt;QPDF&lt;/a&gt;.  I&amp;rsquo;ve learnt to add &lt;code&gt;--empty&lt;/code&gt; from&#xA;&lt;a href=&#34;https://github.com/qpdf/qpdf/issues/11&#34;&gt;@qpdf/qpdf:#12&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;qpdf --empty --pages *.pdf -- out.pdf&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
