pdfio/examples/md2pdf.md

28 lines
674 B
Markdown
Raw Normal View History

2024-12-11 21:37:03 +01:00
---
2024-12-14 05:12:48 +01:00
title: Markdown to PDF Converter Example
2024-12-11 21:37:03 +01:00
...
2024-12-14 05:12:48 +01:00
Markdown to PDF Converter Example
=================================
2024-12-11 21:37:03 +01:00
2024-12-14 05:12:48 +01:00
The `md2pdf` example program reads a markdown file and formats the content onto
pages in a PDF file. It demonstrates how to:
2024-12-11 21:37:03 +01:00
2024-12-14 05:12:48 +01:00
- Embed base and TrueType fonts,
- Format text,
- Embed JPEG and PNG images,
- Add headers and footers, and
2024-12-15 16:23:59 +01:00
- Add hyperlinks.
2024-12-11 21:37:03 +01:00
2024-12-14 05:12:48 +01:00
Source Files
------------
2024-12-11 21:37:03 +01:00
2024-12-14 05:12:48 +01:00
The `md2pdf` program is organized into three source files: `md2pdf.c` which
2024-12-15 01:56:45 +01:00
contains the code to format the markdown content and `mmd.h` and `mmd.c` (from
the [Miniature Markdown Library][MMD] project) which load the markdown content.
2024-12-11 21:37:03 +01:00
2024-12-14 05:12:48 +01:00
[MMD]: https://www.msweet.org/mmd/
2024-12-15 01:56:45 +01:00