Skip to content

Latest commit

 

History

History
113 lines (83 loc) · 2.7 KB

File metadata and controls

113 lines (83 loc) · 2.7 KB

Elegant Markdown to PDF Example

This document showcases the extensive Markdown capabilities supported by our PDF converter, demonstrating clean, professional rendering for all standard elements.

1. Typography & Text Effects

You can easily emphasize text using standard markdown:

  • Bold Text: **Bold Text**
  • Italic Text: *Italic Text*
  • Bold & Italic: ***Bold & Italic***
  • Strikethrough: ~~Strikethrough~~

2. Headings

Heading 1 (H1)

Heading 2 (H2)

Heading 3 (H3)

Heading 4 (H4)

Heading 5 (H5)

3. Lists

Unordered Lists

  • Item 1
  • Item 2
    • Sub-item A
    • Sub-item B

Ordered Lists

  1. First step
  2. Second step
    1. Sub-step 2.1
    2. Sub-step 2.2

Task Lists (Checkboxes)

  • Completed task
  • Pending task 1
  • Pending task 2

4. Blockquotes

"The advance of technology is based on making it fit in so that you don't really even notice it, so it's part of everyday life." — Bill Gates

Nested Blockquote Example

5. Links & Images

  • Standard Link: Google
  • Image: Local Demo Image

6. Code & Preformatted Text

Inline Code

Use backticks for inline code like npm install.

Code Blocks

const { mdToPdf } = require('md-to-pdf');

async function convert() {
    console.log("Hello, PDF!");
}

7. Professional Tables

Our converter automatically styles standard Markdown tables into clean, professional data tables (no ugly borders!).

Feature Support Notes
Typography Native OS fonts used
Pagination Smart page breaks
Tables Professional minimalist look

8. Custom Side-by-Side Layout (Flexbox)

Use <div class="flex-container"> and <div class="flex-item"> for advanced document layouts:

Left Column

This is standard paragraph text. Notice how it aligns perfectly without breaking the flow.

Right Column

  • Perfect for resumes
  • Great for comparisons
  • Responsive design

9. Manual Page Breaks

Sometimes you need to force a new page at a specific spot. You can do this by inserting a simple HTML div:

<div class="page-break"></div>

10. Content After Page Break

This section started on a fresh page thanks to the manual page break above. This is incredibly useful for:

  • Starting new chapters
  • Keeping tables and their captions together
  • Professional document structure

Generated by Elegant MD-to-PDF Converter