[PLUG] Converting markdown to pdf

Jason Barnett jason.barnett71 at gmail.com
Wed Jun 16 17:01:20 UTC 2021


Interesting...

When I run head against an MD file generated by Joplin, I get an entirely
different file structure.

> [jason at XPS15 tmp]$ head Welcome\!\ \(Desktop\)/1.\ Welcome\ to\ Joplin\!\
> 🗒️.md
> 1. Welcome to Joplin! 🗒️
>
> # Welcome to Joplin! 🗒️
>
> Joplin is a free, open source note taking and to-do application, which
> helps you write and organise your notes, and synchronise them between your
> devices. The notes are searchable, can be copied, tagged and
> modified either from the applications directly or from your own text
> editor. The notes are in [Markdown format](https://joplinapp.org/#markdown).
> Joplin is available as a ** desktop**, ** mobile** and **
>  terminal** application.
>
> The notes in this notebook give an overview of what Joplin can do and how
> to use it. In general, the three applications share roughly the same
> functionalities; any differences will be clearly indicated.
>
> ![](../_resources/4a2c2f8b67b745ffbc6eb76fe638e571.png


I think you and I are looking at different file types.

I ran head against a random README.md from github and got something closer
to what you had, but Okular rendered this fine:

> [jason at XPS15 jest]$ head README.md
> <p align="center">
>  <a href="http://badge.fury.io/js/jest"><img src="
> https://badge.fury.io/js/jest.svg" alt="npm version"></a>
>  <a href="https://github.com/facebook/jest/blob/master/LICENSE">
>    <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Jest
> is released under the MIT license." />
>  </a>
>  <a href="https://twitter.com/intent/follow?screen_name=fbjest"><img
> align="center" src="
> https://img.shields.io/twitter/follow/fbjest.svg?style=social&label=Follow%20@fbjest"
> alt="Follow on Twitter"></a>
> </p>
>
> <!-- A spacer -->
> <p> </p>
>
>
 I think the

> <!DOCTYPE html>
> <html lang="en" data-color-mode="auto" data-light-theme="light" data
> dark-theme="dark">
>
is confusing Okular. As soon as I removed those lines, it stopped rendering
the code and actually tried rendering it (unsuccessfully).

Not sure how to help from here, but I hope I have pointed you in a useful
direction.

Jason

On Wed, Jun 16, 2021 at 9:42 AM Rich Shepard <rshepard at appl-ecosys.com>
wrote:

> On Wed, 16 Jun 2021, Jason Barnett wrote:
>
> > Try Okular, it will read MD files and can save PDF.
>
> Jason,
>
> I opened the .md file in Okular and tried saving it as a PDF, but that
> didn't work. So I exported it as a .pdf yet it's still all html; e.g.,
>
> <!DOCTYPE html>
> <html lang="en" data-color-mode="auto" data-light-theme="light" data
> dark-theme="dark">
> <head>
> <meta charset="utf-8">
> <link rel="dns-prefetch" href="https://github.githubassets.com">
> <link rel="dns-prefetch"
> href="https://avatars.githubusercontent.com">
> <link rel="dns-prefetch" href="https://github
> cloud.s3.amazonaws.com">
> <link rel="dns-prefetch" href="https://user
> images.githubusercontent.com/">
>
>
> Sigh.
>
> Thanks,
>
> Rich
>



More information about the PLUG mailing list