<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ana Cunha</title>
    <description>The latest articles on DEV Community by Ana Cunha (@anacunha).</description>
    <link>https://dev.to/anacunha</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F195731%2F35466f74-4705-4682-8dc3-524130bfc09e.jpg</url>
      <title>DEV Community: Ana Cunha</title>
      <link>https://dev.to/anacunha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anacunha"/>
    <language>en</language>
    <item>
      <title>From Markdown to PDF</title>
      <dc:creator>Ana Cunha</dc:creator>
      <pubDate>Wed, 28 Jan 2026 04:04:43 +0000</pubDate>
      <link>https://dev.to/anacunha/from-markdown-to-pdf-29io</link>
      <guid>https://dev.to/anacunha/from-markdown-to-pdf-29io</guid>
      <description>&lt;p&gt;Today I wanted to print a markdown file and found out there was no straightforward way to do it from my code editor. Even though they have beautiful markdown previews, they won't let you print them.&lt;/p&gt;

&lt;p&gt;That's when I found pandoc. &lt;a href="https://pandoc.org/" rel="noopener noreferrer"&gt;Pandoc&lt;/a&gt; is a document converter that can turn markdown into PDF. It does this by converting markdown to LaTeX first, then using LaTeX to generate the PDF.&lt;/p&gt;

&lt;p&gt;I don't miss struggling with &lt;a href="https://www.latex-project.org/" rel="noopener noreferrer"&gt;LaTeX&lt;/a&gt; from my computer science student days, but it always produced beautiful documents (when I didn't mess anything up).&lt;/p&gt;

&lt;p&gt;Here is the setup on macOS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;pandoc
brew &lt;span class="nb"&gt;install &lt;/span&gt;basictex
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installing basictex, restart your terminal to get the LaTeX binaries in your path.&lt;/p&gt;

&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pandoc file.md &lt;span class="nt"&gt;-o&lt;/span&gt; file.pdf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. PDFs from all your Markdown files.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>tutorial</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
