<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>EsmaeelE - Free Software enthusiast - Linux</title>
    <subtitle>DevOps, Kubernetes, and Infrastructure Automation</subtitle>
    <link rel="self" type="application/atom+xml" href="https://esmaeele.github.io/tags/linux/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://esmaeele.github.io"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-06-20T00:00:00+00:00</updated>
    <id>https://esmaeele.github.io/tags/linux/atom.xml</id>
    <entry xml:lang="en">
        <title>Fixing Page Order When Cropping Two-Column Persian PDFs</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/cropbook/"/>
        <id>https://esmaeele.github.io/blog/cropbook/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/cropbook/">&lt;h1 id=&quot;fixing-page-order-when-cropping-two-column-persian-pdfs&quot;&gt;Fixing Page Order When Cropping Two-Column Persian PDFs&lt;&#x2F;h1&gt;
&lt;p&gt;Some e-book readers render two-column scanned PDFs poorly. Splitting each spread into individual
pages fixes readability — but for Persian (right-to-left) books, a naive split leaves the pages in
the wrong order.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Credit to &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;jadi.net&#x2F;2012&#x2F;02&#x2F;linux-convert-pdf-to-one-column&#x2F;&quot;&gt;Jadi&#x27;s original post&lt;&#x2F;a&gt; for the
&lt;code&gt;convert&lt;&#x2F;code&gt;-based approach — this uses &lt;code&gt;mutool&lt;&#x2F;code&gt; instead, which handles the splitting in one step.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;1-split-each-two-column-page-into-two-single-pages&quot;&gt;1. Split Each Two-Column Page Into Two Single Pages&lt;&#x2F;h2&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install mupdf-tools&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;mutool&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; poster -x&lt;&#x2F;span&gt;&lt;span style=&quot;color: #FAB387;&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; haj_sayah.pdf output.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;What this does:&lt;&#x2F;strong&gt; Splits each two-column spread into two separate single-column pages.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;2-fix-the-resulting-page-order&quot;&gt;2. Fix the Resulting Page Order&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;strong&gt;Why it breaks:&lt;&#x2F;strong&gt; Persian is written right-to-left, so pages in a Persian book are ordered in
reverse relative to a left-to-right book. &lt;code&gt;mutool poster&lt;&#x2F;code&gt; splits pages assuming left-to-right order,
which works fine for English books but scrambles the order for Persian ones.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;The fix:&lt;&#x2F;strong&gt; Swap each even page with the odd page next to it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; apt install pdftk&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;pdftk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; output.pdf shuffle even odd output haj_sayyah_.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;3-restore-the-original-cover&quot;&gt;3. Restore the Original Cover&lt;&#x2F;h2&gt;
&lt;p&gt;The shuffle step also reorders the cover. Swap it back from the original file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: #89B4FA;font-style: italic;&quot;&gt;pdftk&lt;&#x2F;span&gt;&lt;span style=&quot;color: #A6E3A1;&quot;&gt; A=haj_sayyah_.pdf B=haj_sayah.pdf cat B1 A3-end output out1.pdf&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;result&quot;&gt;Result&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;code&gt;out1.pdf&lt;&#x2F;code&gt; is the final, correctly-ordered, single-column file — readable page by page on any e-reader.&lt;&#x2F;p&gt;
&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Step&lt;&#x2F;th&gt;&lt;th&gt;Command&lt;&#x2F;th&gt;&lt;th&gt;Purpose&lt;&#x2F;th&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;mutool poster -x 2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Split columns&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;pdftk shuffle even odd&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Fix RTL order&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;&lt;code&gt;pdftk cat B1 A3-end&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Restore cover&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>آرشیو LPIC</title>
        <published>2026-06-20T00:00:00+00:00</published>
        <updated>2026-06-20T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              EsmaeelE
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://esmaeele.github.io/blog/hooshmandi/"/>
        <id>https://esmaeele.github.io/blog/hooshmandi/</id>
        
        <content type="html" xml:base="https://esmaeele.github.io/blog/hooshmandi/">&lt;h1 id=&quot;arshyw-dwrh-lpic1-z-pymn-hwshmndy-rd&quot;&gt;آرشیو دورهٔ LPIC1 از پیمان هوشمندی راد&lt;&#x2F;h1&gt;
&lt;div dir=&quot;rtl&quot; style=&quot;text-align: right; line-height: 2.2;&quot;&gt;
&lt;p&gt;یکی از آموزش‌های خوب برای شروع گنو&#x2F;لینوکس دوره‌ای است که پیمان هوشمندی برای موسسهٔ gotoclass آماده کرده است.&lt;&#x2F;p&gt;
&lt;p&gt;از آنجایی که این دوره از اینترنت حذف شده و درخواست‌های گه‌گاه برای داشتن آن، از دوست خوبم &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;Amirh14123&quot;&gt;امیرحسین&lt;&#x2F;a&gt; خواستم که نسخه‌ای از آن را روی گوگل درایو قرار دهد تا دسترسی پذیر شود.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left; margin-top: 1.5rem;&quot;&gt;
&lt;p&gt;&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1gbmkv-keICYdnap5uYssB5RVno4EzGmb&#x2F;view&quot;&gt;Download Link&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
</content>
        
    </entry>
</feed>
