Md file to pdf conversion is not working well

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Issue Summary:

When requesting a PDF conversion from a plan-generated Markdown (.md) file, the resulting PDF renders unformatted plain text with broken visual hierarchy and poor layout styling. Conversely, submitting the exact same Markdown input directly to Gemini produces a well-structured, clean PDF layout.

Observed Behavior:

Unformatted output (missing proper margins, heading hierarchies, table padding, and visual callouts).

Inconsistent rendering compared to native Gemini output.

Expected Behavior:

The generated PDF should maintain standard Markdown structural styling, including clean typography, formatted tables, section dividers, and appropriate page margins.

Action Requested:

Please review the PDF generation layout/CSS templates used during conversion to align the rendering output with standard structured Markdown specifications.

Steps to Reproduce

  • Give any md file
  • Ask to conver to pdf file
  • see the generated output

Operating System

MacOS

Version Information

Version: 3.15.19
VS Code Extension API: 1.128.0
Commit: de07bee81cefe43461ebf4f40c3d2d78d15052a0
Date: 2026-08-11T05:22:54.627Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey there! Thanks for the detailed writeup.

There’s no built-in Markdown→PDF converter in Cursor (so no layout/CSS templates to tweak). When you ask the agent to convert, it improvises with whatever’s on your machine, which is why you get plain text. Reliable fix: use a real converter and name it in the prompt:

npx md-to-pdf plan.md
# or: brew install pandoc weasyprint && pandoc plan.md -o plan.pdf --pdf-engine=weasyprint

Then: “convert plan.md to PDF using md-to-pdf”. That produces proper headings, tables, and margins.

A native export isn’t available today. We’ll be tracking this thread to gauge interest, which helps our product team prioritize.