<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>pdf | Nerdpress.org</title>
	<atom:link href="https://nerdpress.org/tag/pdf/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerdpress.org</link>
	<description>...dev, tech problems and solutions.</description>
	<lastBuildDate>Sat, 31 May 2025 10:25:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Yazi PDF preview not working</title>
		<link>https://nerdpress.org/2025/05/31/yazi-pdf-preview-not-working/</link>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Sat, 31 May 2025 10:25:43 +0000</pubDate>
				<category><![CDATA[TUI]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[tui]]></category>
		<category><![CDATA[yazi]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=3415</guid>

					<description><![CDATA[<p>Yazi is a terminal-based file manager (TUI) that I use heavily because it&#8217;s fast and lets me navigate files and folders without needing a mouse. (&#8230;and I really dislike the OSX Finder) Yazi can render previews for images and PDF files, but in my case, PDF previews weren&#8217;t showing up. Yazi requires Poppler for PDF &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2025/05/31/yazi-pdf-preview-not-working/" class="more-link">Continue reading<span class="screen-reader-text"> "Yazi PDF preview not working"</span></a></p>
The post <a href="https://nerdpress.org/2025/05/31/yazi-pdf-preview-not-working/">Yazi PDF preview not working</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p><a href="https://yazi-rs.github.io/" target="_blank" rel="noopener" title="">Yazi</a> is a terminal-based file manager (TUI) that I use heavily because it&#8217;s fast and lets me navigate files and folders without needing a mouse. (&#8230;and I really dislike the OSX Finder)</p>



<p>Yazi can render previews for images and PDF files, but in my case, PDF previews weren&#8217;t showing up. Yazi requires Poppler for PDF previewing&#8211;and it was already installed on my system&#8211;the previews still didn&#8217;t work.</p>



<p>So I began debugging by running <code>yazi --debug</code>, which provides detailed information about your Yazi installation. Under the Dependencies section, I noticed a suspicious message:</p>



<pre class="wp-block-preformatted">pdftoppm      : ExitStatus(unix_wait_status(25344)),"pdftoppm version 4.0...</pre>



<span id="more-3415"></span>



<p><br />This should actually just render the version of <strong>pdftoppm</strong> by poppler like:</p>



<pre class="wp-block-preformatted">pdftoppm      : 25.04.0</pre>



<p>So there was clearly some issue with <strong>Poppler</strong> and <strong>pdftoppm</strong> here.<br />Then I ran <strong>Yazi</strong> with a debug log enabled: <code>YAZI_LOG=debug yazi</code><br />and checked the log file in <code>~/.local/state/yazi/yazi.log</code></p>



<p>And there was also an error:</p>



<pre class="wp-block-preformatted">ERROR yazi_scheduler::prework::prework: Error when running preloader pdf:<br />Failed to convert PDF to image, stderr: pdftoppm version 4.05 [www.xpdfreader.com]</pre>



<p>It turns out that Xpdf was conflicting with the actual <code>pdftoppm</code> utility from Poppler. I had previously installed Xpdf for some reason, and it was now preventing Poppler from being installed properly. The error message confirmed the conflict:</p>



<pre class="wp-block-preformatted">Error: Cannot install poppler because conflicting formulae are installed.<br />xpdf: because poppler, pdftohtml, pdf2image, and xpdf install conflicting executables</pre>



<p>So I uninstalled Xpdf via brew: <code>brew unlink xpdf</code><br />Reinstalled <strong>Poppler</strong> via brew and now everything works nice:</p>



<figure class="wp-block-image size-large"><a href="https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview.png"><img fetchpriority="high" decoding="async" width="1024" height="167" src="https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview-1024x167.png" alt="" class="wp-image-3416" srcset="https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview-1024x167.png 1024w, https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview-300x49.png 300w, https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview-768x125.png 768w, https://nerdpress.org/wp-content/uploads/2025/05/yazi-pdf-preview.png 1286w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /></a><figcaption class="wp-element-caption">Yazi terminal file manager PDF preview</figcaption></figure>



<p></p>The post <a href="https://nerdpress.org/2025/05/31/yazi-pdf-preview-not-working/">Yazi PDF preview not working</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Testing PDF creation with headless chrome and PHP</title>
		<link>https://nerdpress.org/2023/07/28/testing-pdf-creation-with-headless-chrome-and-php/</link>
		
		<dc:creator><![CDATA[Ivo Bathke]]></dc:creator>
		<pubDate>Fri, 28 Jul 2023 09:56:50 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Minicli]]></category>
		<category><![CDATA[pdf]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=3249</guid>

					<description><![CDATA[<p>I had the task the other day to use a headless chrome to generate PDF files from websites in a PHP app. The plan was to use chrome-php with a headless chrome to generate the PDF. Usually you would install chrome/chromium on a linux server via apt and just run chrome from the PATH with &#8230; </p>
<p class="link-more"><a href="https://nerdpress.org/2023/07/28/testing-pdf-creation-with-headless-chrome-and-php/" class="more-link">Continue reading<span class="screen-reader-text"> "Testing PDF creation with headless chrome and PHP"</span></a></p>
The post <a href="https://nerdpress.org/2023/07/28/testing-pdf-creation-with-headless-chrome-and-php/">Testing PDF creation with headless chrome and PHP</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>I had the task the other day to use a headless chrome to generate PDF files from websites in a PHP app.</p>



<p>The plan was to use <a href="https://github.com/chrome-php/chrome" target="_blank" rel="noopener" title="">chrome-php</a> with a headless chrome to generate the PDF.</p>



<p>Usually you would install chrome/chromium on a linux server via <em>apt</em> and just run chrome from the PATH with chrome.<br />Since i was on shared hosting i was not sure if this was possible since i was not allowed to run <em>apt</em> commands.<br />So i tried to use Puppeteer which ships a headless chrome executable and use just this directly.<br />I installed Puppeteer with <em>npm</em> locally and uploaded the chrome executable to the shared hosting.<br />Puppeteer will place the headless chrome in the .cache dir in your home directory, f.e.:</p>



<p><code>~/.cache/puppeteer/chrome/linux-113.0.5672.63/chrome-linux64/chrome</code></p>



<p>Upload:</p>



<p><code>scp -r ~/.cache/puppeteer/chrome/linux-113.0.5672.63/chrome-linux64 me@sharedhosting:/usr/home/test</code></p>



<span id="more-3249"></span>



<p>I also created a nice little command line tool to create the pdf with chrome-php.<br />I used <a href="https://github.com/minicli/minicli" target="_blank" rel="noopener" title="">minicli</a> which is a &#8220;minimalist, dependency-free framework for building CLI-centric PHP applications&#8221;.<br />So you can create cli commands fast and without all the clutter, exactly what i needed for this small test.<br />You can find the code on Github: <a href="https://github.com/ivoba/chrome-php-minicli" target="_blank" rel="noopener" title="">https://github.com/ivoba/chrome-php-minicli</a><br />The command is here: <a href="https://github.com/ivoba/chrome-php-minicli/blob/main/command.php" target="_blank" rel="noopener" title="">https://github.com/ivoba/chrome-php-minicli/blob/main/command.php</a></p>



<p>Then i tried to generate the pdf:<br /><code>CHROME_PATH="/usr/home/test/chrome" php command.php pdf url=https://ivo-bathke.name</code></p>



<p>However this failed because the server lacked required dependencies to run the chrome executable.<br />You can check this by running this command:</p>



<p><code>me@sharedhosting:/usr/home/test$ ldd chrome-linux64/chrome | grep not<br />libatk-1.0.so.0 =&gt; not found<br />libatk-bridge-2.0.so.0 =&gt; not found<br />libxkbcommon.so.0 =&gt; not found<br />libatspi.so.0 =&gt; not found<br />libXcomposite.so.1 =&gt; not found<br />libXrandr.so.2 =&gt; not found<br />libgbm.so.1 =&gt; not found</code></p>



<p>Ok, so it wont work with the uploaded chrome executable.<br />What a pity but still a finding.</p>



<p>In the end i contacted the support and fortunatly they were willing and able to install chromium via <em>apt</em>. Nice!<br /><br />Eventually it worked with:<br /><code>CHROME_PATH="chromium" php command.php pdf url=https://ivo-bathke.name</code></p>



<p>Pdf created :)</p>



<p></p>The post <a href="https://nerdpress.org/2023/07/28/testing-pdf-creation-with-headless-chrome-and-php/">Testing PDF creation with headless chrome and PHP</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Symfony Workflow Component: Dump workflows as PDF</title>
		<link>https://nerdpress.org/2017/11/07/symfony-workflow-component-dump-workflows-pdf/</link>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Tue, 07 Nov 2017 05:10:59 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>
		<category><![CDATA[graphviz]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=2787</guid>

					<description><![CDATA[<p>One very cool feature of the Symfony Workflow Component is the ability to export workflows via graphviz. Did you know you can also directly render those as PDF files? It&#8217;s actually quite easy. Like so:</p>
The post <a href="https://nerdpress.org/2017/11/07/symfony-workflow-component-dump-workflows-pdf/">Symfony Workflow Component: Dump workflows as PDF</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p>One very cool feature of the Symfony Workflow Component is the ability to export workflows via graphviz.</p>
<p>Did you know you can also directly render those as PDF files?<br />
<span id="more-2787"></span></p>
<p>It&#8217;s actually quite easy. Like so:</p>
<pre class="brush: bash; title: ; notranslate">
php bin/console workflow:dump myWorkflow | dot -Tpdf &gt; data/workflow/myWorkflow.pdf
</pre>The post <a href="https://nerdpress.org/2017/11/07/symfony-workflow-component-dump-workflows-pdf/">Symfony Workflow Component: Dump workflows as PDF</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>save as WWF, save a tree</title>
		<link>https://nerdpress.org/2011/02/27/save-as-wwf-save-a-tree/</link>
		
		<dc:creator><![CDATA[Max Girkens]]></dc:creator>
		<pubDate>Sun, 27 Feb 2011 21:17:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nachhaltig]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[wwf]]></category>
		<category><![CDATA[wwf-file]]></category>
		<guid isPermaLink="false">https://nerdpress.org/?p=1372</guid>

					<description><![CDATA[<p>Dogmatix recommends: .WWF &#8211; ein PDF Format, dass sich nicht ausdrucken lässt. Der Umwelt zuliebe. Meine Rechnungen verschicke ich vielleicht trotzdem lieber nicht als .WWF, aber coole Idee. http://www.saveaswwf.com/de/</p>
The post <a href="https://nerdpress.org/2011/02/27/save-as-wwf-save-a-tree/">save as WWF, save a tree</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></description>
										<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Idefix">Dogmatix</a> recommends:</p>
<p>.WWF &#8211; ein PDF Format, dass sich nicht ausdrucken lässt.<br />
Der Umwelt zuliebe.<br />
<span id="more-1372"></span><br />
<iframe title="YouTube video player" width="640" height="390" src="https://www.youtube.com/embed/7JLjx2xxoJs" frameborder="0" allowfullscreen></iframe></p>
<p>Meine Rechnungen verschicke ich vielleicht trotzdem lieber nicht als .WWF,<br />
aber coole Idee.</p>
<p><a href="http://www.saveaswwf.com/de/">http://www.saveaswwf.com/de/</a></p>The post <a href="https://nerdpress.org/2011/02/27/save-as-wwf-save-a-tree/">save as WWF, save a tree</a> first appeared on <a href="https://nerdpress.org">Nerdpress.org</a>.]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
