Skip to content

Add PDF styling best practices prompt#294

Open
wonderwhy-er wants to merge 5 commits intomainfrom
feature/pdf-styling-best-practices
Open

Add PDF styling best practices prompt#294
wonderwhy-er wants to merge 5 commits intomainfrom
feature/pdf-styling-best-practices

Conversation

@wonderwhy-er
Copy link
Owner

@wonderwhy-er wonderwhy-er commented Dec 17, 2025

User description

Summary

Adds a best practices prompt for creating styled PDFs with the write_pdf tool.

Changes

  • Add bp_pdf_styling prompt in onboarding-prompts.json with guidance on:

    • Using tables instead of flexbox for layouts
    • Page break handling
    • Rounded corners (avoid negative margins)
    • Background color behavior across pages
    • Reliable card and dark section patterns
    • Color palette recommendations
  • Update write_pdf tool description to reference the best practices prompt

Why

Lessons learned from iterating on styled PDF creation - these patterns help avoid common rendering issues on the first try.

Notes

Also includes some test sample files that were uncommitted.


CodeAnt-AI Description

Add an in-app PDF styling best-practices prompt and update packaging + samples

What Changed

  • New "PDF Styling Best Practices" onboarding prompt added and made discoverable from the Write/Modify PDF tool; users can fetch concrete guidance (layout, page-breaks, rounded corners, background handling, reliable card patterns, color recommendations) to avoid common PDF rendering issues.
  • Write/Modify PDF tool now points users to that best-practices prompt so authors see guidance when creating complex styled PDFs.
  • MCPB bundle creation now pulls production dependencies from the project package.json so the distributed bundle uses the same dependency list as the main package (reduces mismatch between local and bundled installs).
  • Added multiple sample PDF markdown files for manual testing and examples (simple, invoice, URL sample, and a long complex document) so users and CI can validate PDF rendering and styling patterns.

Impact

✅ Clearer PDF styling guidance
✅ Fewer PDF rendering retries
✅ Consistent bundle dependencies

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • New Features

    • Added a PDF Styling Best Practices prompt offering guidance for creating well-styled PDFs.
  • Documentation

    • Tool descriptions updated to reference the new PDF best-practices guidance.
    • Prompts collection metadata bumped to version 2.1.0 with an expanded description.
  • Samples

    • Added several new sample PDF markdown documents (simple demo, invoice, technical paper, URL demo).

✏️ Tip: You can customize this high-level summary in your review settings.

- Add bp_pdf_styling prompt with layout, page break, and styling guidance
- Reference best practices in write_pdf tool description
- Lessons learned: use tables not flexbox, avoid negative margins for rounded corners, group content to prevent page splits
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 17, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Walkthrough

Replaces hardcoded bundle dependencies with values read from the main package.json, adds a PDF-styling onboarding prompt and bumps prompts metadata, updates server tool descriptions to reference the new prompt, and adds four Markdown PDF sample files for testing.

Changes

Cohort / File(s) Summary
Build script
scripts/build-mcpb.cjs
Stop hardcoding production dependencies in the bundle package.json; read dependencies from the main package.json and add clarifying comments.
Onboarding prompt data
src/data/onboarding-prompts.json
Bumped version to 2.1.0, updated top-level description, and added a new prompt bp_pdf_styling with metadata (title, description, prompt text, categories, secondaryTag, votes, gaClicks, icon, author, verified).
Server tool documentation
src/server.ts
Extended ListTools and write_pdf tool descriptions with PDF OPTIONS and a pointer to the new prompt (get_prompts(action='get_prompt', promptId='bp_pdf_styling')).
PDF sample files
test/samples/01_sample_simple.pdf.md, test/samples/02_sample_invoice.pdf.md, test/samples/03_sample_compex.pdf.md, test/samples/URL Sample.md
Added four Markdown sample documents: a simple Hello World PDF, an invoice example, a long technical paper on LP greeks, and a URL-based sample for PDF testing.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review dynamic dependency resolution and resulting bundle package.json in scripts/build-mcpb.cjs.
  • Validate schema and fields for the new prompt in src/data/onboarding-prompts.json.
  • Verify src/server.ts descriptions reference the correct prompt ID and formatting.
  • Quick check of new sample files for filename encoding and content fidelity (notably 03_sample_compex.pdf.md spelling).

Possibly related PRs

Suggested labels

size:L

Suggested reviewers

  • dmitry-ottic-ai
  • serg33v

Poem

🐰 I nibble package.json, fetch the seeds within,
A PDF prompt and samples tumble out with a grin,
Build script hums, server notes point the way,
New prompts and pages hop into play,
Little rabbit cheers — the repo's brighter today!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add PDF styling best practices prompt' directly and specifically summarizes the main change: adding a new PDF styling best-practices prompt to the onboarding-prompts.json file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/pdf-styling-best-practices

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2379a2 and 6fda7ef.

📒 Files selected for processing (1)
  • src/data/onboarding-prompts.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/data/onboarding-prompts.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Dec 17, 2025
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 17, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Dependency Inclusion
    The new code writes dependencies: packageJson.dependencies into the bundle package.json without validation or filtering. If packageJson.dependencies is undefined, contains local file: specifiers, git URLs, or workspace references, the bundle's install step may fail or produce unexpected behavior. Consider validating and sanitizing dependency entries before writing them into the bundle.

  • Discoverability mismatch
    The server currently exposes a ListPromptsRequestSchema handler that returns an empty list. That contradicts the added guidance telling users to call get_prompts for the bp_pdf_styling prompt. Ensure the prompts listing endpoint and capabilities are consistent with available prompts so clients can discover onboarding prompts.

  • Robustness / Fallback Missing
    The added comments and behavior assume packageJson and its dependencies are present and well-formed. There is no fallback if packageJson.dependencies is missing or not an object. This can cause the written bundle package.json to contain dependencies: undefined or throw at runtime.

  • Prompt availability
    The new write_pdf description references a specific promptId (bp_pdf_styling) via get_prompts(action='get_prompt', promptId='bp_pdf_styling'). Verify that this prompt actually exists in the prompts data loaded by ./tools/prompts.js and that consumers can retrieve it. If the prompt is missing, users will be directed to a non-existent prompt.

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 17, 2025

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93f4114 and 9944621.

⛔ Files ignored due to path filters (1)
  • desktop-commander-v0.2.24-release-notes.pdf is excluded by !**/*.pdf
📒 Files selected for processing (7)
  • scripts/build-mcpb.cjs (2 hunks)
  • src/data/onboarding-prompts.json (1 hunks)
  • src/server.ts (1 hunks)
  • test/samples/01_sample_simple.pdf.md (1 hunks)
  • test/samples/02_sample_invoice.pdf.md (1 hunks)
  • test/samples/03_sample_compex.pdf.md (1 hunks)
  • test/samples/URL Sample.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
test/samples/01_sample_simple.pdf.md

[uncategorized] ~3-~3: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...World This is a test PDF created from markdown. ## Features Simple text Bold text...

(MARKDOWN_NNP)

test/samples/03_sample_compex.pdf.md

[grammar] ~15-~15: Ensure spelling is correct
Context: ...s, impermanent gain ∗The authors are greteful to 0xSami_, Andrea Bugin, Andrea Prampo...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~24-~24: Consider a more concise word here.
Context: ...e for a percentage of the trading fees, in order to facilitate trades. While transactions o...

(IN_ORDER_TO_PREMIUM)


[style] ~28-~28: Consider a more concise word here.
Context: ...quidity pool with crypto assets it owns in order to facilitate trading on the platform and ...

(IN_ORDER_TO_PREMIUM)


[style] ~32-~32: Consider a more concise word here.
Context: ...okens to be locked for a period of time in order to access additional rewards (Liquidity Mi...

(IN_ORDER_TO_PREMIUM)


[style] ~36-~36: ‘in brief’ might be wordy. Consider a shorter alternative.
Context: ...tant product AMM Here we will present in brief what is a constant product AMM for a mo...

(EN_WORDINESS_PREMIUM_IN_BRIEF)


[style] ~50-~50: ‘in an instant’ might be wordy. Consider a shorter alternative.
Context: ...e of this type of pools is that knowing in an instant t 0 the following data: - the constan...

(EN_WORDINESS_PREMIUM_IN_AN_INSTANT)


[style] ~59-~59: Consider using the more formal “until”.
Context: ...no injection of new capital in the pool till time T , we can calculate the number of...

(TILL)


[style] ~141-~141: Consider using the more formal “until”.
Context: ...### √ αt − 1) What we have ignored till now are the fees that Traders have to p...

(TILL)


[style] ~165-~165: Consider using “who” when you are referring to a person instead of an object.
Context: ... DeFi jargon an HODLer indicates a user that holds its tokens without doing anything...

(THAT_WHO)


[style] ~180-~180: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...rn of a LP and that of an equal-weight (with respect to the starting time) HODLer. For a more i...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[grammar] ~180-~180: Use a hyphen to join words.
Context: ...the starting time) HODLer. For a more in depth analysis of it on UniSwap, the mos...

(QB_NEW_EN_HYPHEN)


[style] ~274-~274: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ...to zero only if the price of token x is exactly the same as its starting price S 0 (r = 0). This...

(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)


[style] ~386-~386: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...ative of the price of the position (Pt) with respect to the underlying price (St): #### ∆LP :...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~425-~425: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...ative of the price of the position (Pt) with respect to the underlying price (St). It can also ...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~425-~425: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...seen as the partial derivative of Delta with respect to the underlying price: #### ΓLP := ...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~478-~478: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...derivative of the price of the position with respect to the volatility (σ): νLP := ∂Pt ∂σ ###...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~484-~484: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...ative of the price of the position (Pt) with respect to time (t): #### ΘLP := ∂Pt ∂t = ...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~494-~494: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...ative of the price of the position (Pt) with respect to the risk-free rate (rf ): ρLP := ...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[style] ~504-~504: Consider a more concise word here.
Context: ...older to additional vega and rho risks. In order to calculate the fair price of the locked ...

(IN_ORDER_TO_PREMIUM)


[grammar] ~521-~521: Use a hyphen to join words.
Context: ...d" process relative to token x with risk free rate rx (we can take for example th...

(QB_NEW_EN_HYPHEN)


[grammar] ~521-~521: Use a hyphen to join words.
Context: ...d" process relative to token y with risk free rate ry (analogously we can take th...

(QB_NEW_EN_HYPHEN)


[style] ~549-~549: The adverb ‘also’ is commonly used to connect clauses and isn’t usually used at the end of a phrase or before a conjunction. Consider replacing it with a more formal alternative.
Context: ...at we can use the market price dynamics also for the pool price dynamics. From here ...

(ALSO_AS_WELL)


[grammar] ~931-~931: Use a hyphen to join words.
Context: ... Even if we have a model with two risk free rates we note that the price depend...

(QB_NEW_EN_HYPHEN)


[style] ~931-~931: ‘with respect to’ might be wordy. Consider a shorter alternative.
Context: ...rf so we can study only the sensibility with respect to rf. ρLP := ∂Pt ∂rf #### = −V 0 #...

(EN_WORDINESS_PREMIUM_WITH_RESPECT_TO)


[grammar] ~1346-~1346: Ensure spelling is correct
Context: ... IG Delta 1% IG 4.2.3 Gamma #### ΓIG = ∂^2 Pt ∂S^2 t #### = #### V 0 ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~1677-~1677: This phrase is redundant. Consider writing “eliminates”.
Context: ...cked liquidity, buying Impermanent Gain completely eliminates Gamma and Vega risks as well as signifi...

(COMPLETELY_ANNIHILATE)

🪛 markdownlint-cli2 (0.18.1)
test/samples/03_sample_compex.pdf.md

71-71: Multiple headings with the same content

(MD024, no-duplicate-heading)


83-83: Multiple headings with the same content

(MD024, no-duplicate-heading)


85-85: Multiple headings with the same content

(MD024, no-duplicate-heading)


89-89: Multiple headings with the same content

(MD024, no-duplicate-heading)


91-91: Multiple headings with the same content

(MD024, no-duplicate-heading)


97-97: Multiple headings with the same content

(MD024, no-duplicate-heading)


99-99: Multiple headings with the same content

(MD024, no-duplicate-heading)


105-105: Multiple headings with the same content

(MD024, no-duplicate-heading)


107-107: Multiple headings with the same content

(MD024, no-duplicate-heading)


113-113: Multiple headings with the same content

(MD024, no-duplicate-heading)


121-121: Multiple headings with the same content

(MD024, no-duplicate-heading)


125-125: Multiple headings with the same content

(MD024, no-duplicate-heading)


131-131: Multiple headings with the same content

(MD024, no-duplicate-heading)


137-137: Multiple headings with the same content

(MD024, no-duplicate-heading)


149-149: Multiple headings with the same content

(MD024, no-duplicate-heading)


153-153: Multiple headings with the same content

(MD024, no-duplicate-heading)


159-159: Multiple headings with the same content

(MD024, no-duplicate-heading)


184-184: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


192-192: Multiple headings with the same content

(MD024, no-duplicate-heading)


194-194: Multiple headings with the same content

(MD024, no-duplicate-heading)


204-204: Multiple headings with the same content

(MD024, no-duplicate-heading)


208-208: Multiple headings with the same content

(MD024, no-duplicate-heading)


216-216: Multiple headings with the same content

(MD024, no-duplicate-heading)


218-218: Multiple headings with the same content

(MD024, no-duplicate-heading)


240-240: Multiple headings with the same content

(MD024, no-duplicate-heading)


242-242: Multiple headings with the same content

(MD024, no-duplicate-heading)


246-246: Multiple headings with the same content

(MD024, no-duplicate-heading)


266-266: Multiple headings with the same content

(MD024, no-duplicate-heading)


293-293: Multiple headings with the same content

(MD024, no-duplicate-heading)


303-303: Multiple headings with the same content

(MD024, no-duplicate-heading)


305-305: Multiple headings with the same content

(MD024, no-duplicate-heading)


307-307: Multiple headings with the same content

(MD024, no-duplicate-heading)


311-311: Multiple headings with the same content

(MD024, no-duplicate-heading)


313-313: Multiple headings with the same content

(MD024, no-duplicate-heading)


319-319: Multiple headings with the same content

(MD024, no-duplicate-heading)


323-323: Multiple headings with the same content

(MD024, no-duplicate-heading)


335-335: Multiple headings with the same content

(MD024, no-duplicate-heading)


339-339: Multiple headings with the same content

(MD024, no-duplicate-heading)


341-341: Multiple headings with the same content

(MD024, no-duplicate-heading)


347-347: Multiple headings with the same content

(MD024, no-duplicate-heading)


349-349: Multiple headings with the same content

(MD024, no-duplicate-heading)


351-351: Multiple headings with the same content

(MD024, no-duplicate-heading)


353-353: Multiple headings with the same content

(MD024, no-duplicate-heading)


366-366: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


374-374: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


413-413: Multiple headings with the same content

(MD024, no-duplicate-heading)


415-415: Multiple headings with the same content

(MD024, no-duplicate-heading)


417-417: Multiple headings with the same content

(MD024, no-duplicate-heading)


419-419: Multiple headings with the same content

(MD024, no-duplicate-heading)


431-431: Multiple headings with the same content

(MD024, no-duplicate-heading)


439-439: Multiple headings with the same content

(MD024, no-duplicate-heading)


443-443: Multiple headings with the same content

(MD024, no-duplicate-heading)


466-466: Multiple headings with the same content

(MD024, no-duplicate-heading)


468-468: Multiple headings with the same content

(MD024, no-duplicate-heading)


470-470: Multiple headings with the same content

(MD024, no-duplicate-heading)


472-472: Multiple headings with the same content

(MD024, no-duplicate-heading)


500-500: Multiple headings with the same content

(MD024, no-duplicate-heading)


561-561: Multiple headings with the same content

(MD024, no-duplicate-heading)


571-571: Multiple headings with the same content

(MD024, no-duplicate-heading)


573-573: Multiple headings with the same content

(MD024, no-duplicate-heading)


575-575: Multiple headings with the same content

(MD024, no-duplicate-heading)


579-579: Multiple headings with the same content

(MD024, no-duplicate-heading)


587-587: Multiple headings with the same content

(MD024, no-duplicate-heading)


589-589: Multiple headings with the same content

(MD024, no-duplicate-heading)


593-593: Multiple headings with the same content

(MD024, no-duplicate-heading)


597-597: Multiple headings with the same content

(MD024, no-duplicate-heading)


599-599: Multiple headings with the same content

(MD024, no-duplicate-heading)


601-601: Multiple headings with the same content

(MD024, no-duplicate-heading)


605-605: Multiple headings with the same content

(MD024, no-duplicate-heading)


611-611: Multiple headings with the same content

(MD024, no-duplicate-heading)


625-625: Multiple headings with the same content

(MD024, no-duplicate-heading)


629-629: Multiple headings with the same content

(MD024, no-duplicate-heading)


639-639: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


641-641: Multiple headings with the same content

(MD024, no-duplicate-heading)


709-709: Multiple headings with the same content

(MD024, no-duplicate-heading)


711-711: Multiple headings with the same content

(MD024, no-duplicate-heading)


713-713: Multiple headings with the same content

(MD024, no-duplicate-heading)


717-717: Multiple headings with the same content

(MD024, no-duplicate-heading)


721-721: Multiple headings with the same content

(MD024, no-duplicate-heading)


725-725: Multiple headings with the same content

(MD024, no-duplicate-heading)


729-729: Multiple headings with the same content

(MD024, no-duplicate-heading)


737-737: Multiple headings with the same content

(MD024, no-duplicate-heading)


741-741: Multiple headings with the same content

(MD024, no-duplicate-heading)


749-749: Multiple headings with the same content

(MD024, no-duplicate-heading)


753-753: Multiple headings with the same content

(MD024, no-duplicate-heading)


757-757: Multiple headings with the same content

(MD024, no-duplicate-heading)


761-761: Multiple headings with the same content

(MD024, no-duplicate-heading)


767-767: Multiple headings with the same content

(MD024, no-duplicate-heading)


769-769: Multiple headings with the same content

(MD024, no-duplicate-heading)


771-771: Multiple headings with the same content

(MD024, no-duplicate-heading)


777-777: Multiple headings with the same content

(MD024, no-duplicate-heading)


781-781: Multiple headings with the same content

(MD024, no-duplicate-heading)


785-785: Multiple headings with the same content

(MD024, no-duplicate-heading)


789-789: Multiple headings with the same content

(MD024, no-duplicate-heading)


822-822: Multiple headings with the same content

(MD024, no-duplicate-heading)


828-828: Multiple headings with the same content

(MD024, no-duplicate-heading)


832-832: Multiple headings with the same content

(MD024, no-duplicate-heading)


836-836: Multiple headings with the same content

(MD024, no-duplicate-heading)


840-840: Multiple headings with the same content

(MD024, no-duplicate-heading)


876-876: Multiple headings with the same content

(MD024, no-duplicate-heading)


880-880: Multiple headings with the same content

(MD024, no-duplicate-heading)


888-888: Multiple headings with the same content

(MD024, no-duplicate-heading)


892-892: Multiple headings with the same content

(MD024, no-duplicate-heading)


896-896: Multiple headings with the same content

(MD024, no-duplicate-heading)


900-900: Multiple headings with the same content

(MD024, no-duplicate-heading)


902-902: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


904-904: Multiple headings with the same content

(MD024, no-duplicate-heading)


937-937: Multiple headings with the same content

(MD024, no-duplicate-heading)


941-941: Multiple headings with the same content

(MD024, no-duplicate-heading)


947-947: Multiple headings with the same content

(MD024, no-duplicate-heading)


951-951: Multiple headings with the same content

(MD024, no-duplicate-heading)


955-955: Multiple headings with the same content

(MD024, no-duplicate-heading)


959-959: Multiple headings with the same content

(MD024, no-duplicate-heading)


961-961: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


963-963: Multiple headings with the same content

(MD024, no-duplicate-heading)


1002-1002: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


1070-1070: Multiple headings with the same content

(MD024, no-duplicate-heading)


1078-1078: Multiple headings with the same content

(MD024, no-duplicate-heading)


1080-1080: Multiple headings with the same content

(MD024, no-duplicate-heading)


1082-1082: Multiple headings with the same content

(MD024, no-duplicate-heading)


1084-1084: Multiple headings with the same content

(MD024, no-duplicate-heading)


1086-1086: Multiple headings with the same content

(MD024, no-duplicate-heading)


1088-1088: Multiple headings with the same content

(MD024, no-duplicate-heading)


1092-1092: Multiple headings with the same content

(MD024, no-duplicate-heading)


1094-1094: Multiple headings with the same content

(MD024, no-duplicate-heading)


1096-1096: Multiple headings with the same content

(MD024, no-duplicate-heading)


1100-1100: Multiple headings with the same content

(MD024, no-duplicate-heading)


1110-1110: Multiple headings with the same content

(MD024, no-duplicate-heading)


1112-1112: Multiple headings with the same content

(MD024, no-duplicate-heading)


1116-1116: Multiple headings with the same content

(MD024, no-duplicate-heading)


1122-1122: Multiple headings with the same content

(MD024, no-duplicate-heading)


1124-1124: Multiple headings with the same content

(MD024, no-duplicate-heading)


1128-1128: Multiple headings with the same content

(MD024, no-duplicate-heading)


1140-1140: Multiple headings with the same content

(MD024, no-duplicate-heading)


1142-1142: Multiple headings with the same content

(MD024, no-duplicate-heading)


1144-1144: Multiple headings with the same content

(MD024, no-duplicate-heading)


1150-1150: Multiple headings with the same content

(MD024, no-duplicate-heading)


1152-1152: Multiple headings with the same content

(MD024, no-duplicate-heading)


1158-1158: Multiple headings with the same content

(MD024, no-duplicate-heading)


1160-1160: Multiple headings with the same content

(MD024, no-duplicate-heading)


1162-1162: Multiple headings with the same content

(MD024, no-duplicate-heading)


1166-1166: Multiple headings with the same content

(MD024, no-duplicate-heading)


1170-1170: Multiple headings with the same content

(MD024, no-duplicate-heading)


1221-1221: Multiple headings with the same content

(MD024, no-duplicate-heading)


1233-1233: Multiple headings with the same content

(MD024, no-duplicate-heading)


1235-1235: Multiple headings with the same content

(MD024, no-duplicate-heading)


1282-1282: Multiple headings with the same content

(MD024, no-duplicate-heading)


1286-1286: Multiple headings with the same content

(MD024, no-duplicate-heading)


1288-1288: Multiple headings with the same content

(MD024, no-duplicate-heading)


1290-1290: Multiple headings with the same content

(MD024, no-duplicate-heading)


1292-1292: Multiple headings with the same content

(MD024, no-duplicate-heading)


1298-1298: Multiple headings with the same content

(MD024, no-duplicate-heading)


1300-1300: Multiple headings with the same content

(MD024, no-duplicate-heading)


1302-1302: Multiple headings with the same content

(MD024, no-duplicate-heading)


1306-1306: Multiple headings with the same content

(MD024, no-duplicate-heading)


1310-1310: Multiple headings with the same content

(MD024, no-duplicate-heading)


1314-1314: Multiple headings with the same content

(MD024, no-duplicate-heading)


1356-1356: Multiple headings with the same content

(MD024, no-duplicate-heading)


1362-1362: Multiple headings with the same content

(MD024, no-duplicate-heading)


1364-1364: Multiple headings with the same content

(MD024, no-duplicate-heading)


1366-1366: Multiple headings with the same content

(MD024, no-duplicate-heading)


1370-1370: Multiple headings with the same content

(MD024, no-duplicate-heading)


1374-1374: Multiple headings with the same content

(MD024, no-duplicate-heading)


1384-1384: Multiple headings with the same content

(MD024, no-duplicate-heading)


1386-1386: Multiple headings with the same content

(MD024, no-duplicate-heading)


1388-1388: Multiple headings with the same content

(MD024, no-duplicate-heading)


1394-1394: Multiple headings with the same content

(MD024, no-duplicate-heading)


1396-1396: Multiple headings with the same content

(MD024, no-duplicate-heading)


1398-1398: Multiple headings with the same content

(MD024, no-duplicate-heading)


1402-1402: Multiple headings with the same content

(MD024, no-duplicate-heading)


1406-1406: Multiple headings with the same content

(MD024, no-duplicate-heading)


1410-1410: Multiple headings with the same content

(MD024, no-duplicate-heading)


1445-1445: Multiple headings with the same content

(MD024, no-duplicate-heading)


1451-1451: Multiple headings with the same content

(MD024, no-duplicate-heading)


1453-1453: Multiple headings with the same content

(MD024, no-duplicate-heading)


1455-1455: Multiple headings with the same content

(MD024, no-duplicate-heading)


1459-1459: Multiple headings with the same content

(MD024, no-duplicate-heading)


1463-1463: Multiple headings with the same content

(MD024, no-duplicate-heading)


1467-1467: Multiple headings with the same content

(MD024, no-duplicate-heading)


1473-1473: Multiple headings with the same content

(MD024, no-duplicate-heading)


1479-1479: Multiple headings with the same content

(MD024, no-duplicate-heading)


1483-1483: Multiple headings with the same content

(MD024, no-duplicate-heading)


1487-1487: Multiple headings with the same content

(MD024, no-duplicate-heading)


1491-1491: Multiple headings with the same content

(MD024, no-duplicate-heading)


1495-1495: Multiple headings with the same content

(MD024, no-duplicate-heading)


1497-1497: Multiple headings with the same content

(MD024, no-duplicate-heading)


1499-1499: Multiple headings with the same content

(MD024, no-duplicate-heading)


1503-1503: Multiple headings with the same content

(MD024, no-duplicate-heading)


1507-1507: Multiple headings with the same content

(MD024, no-duplicate-heading)


1511-1511: Multiple headings with the same content

(MD024, no-duplicate-heading)


1548-1548: Multiple headings with the same content

(MD024, no-duplicate-heading)


1554-1554: Multiple headings with the same content

(MD024, no-duplicate-heading)


1556-1556: Multiple headings with the same content

(MD024, no-duplicate-heading)


1558-1558: Multiple headings with the same content

(MD024, no-duplicate-heading)


1562-1562: Multiple headings with the same content

(MD024, no-duplicate-heading)


1566-1566: Multiple headings with the same content

(MD024, no-duplicate-heading)


1570-1570: Multiple headings with the same content

(MD024, no-duplicate-heading)


1572-1572: Multiple headings with the same content

(MD024, no-duplicate-heading)


1582-1582: Multiple headings with the same content

(MD024, no-duplicate-heading)


1584-1584: Multiple headings with the same content

(MD024, no-duplicate-heading)


1586-1586: Multiple headings with the same content

(MD024, no-duplicate-heading)


1590-1590: Multiple headings with the same content

(MD024, no-duplicate-heading)


1594-1594: Multiple headings with the same content

(MD024, no-duplicate-heading)


1598-1598: Multiple headings with the same content

(MD024, no-duplicate-heading)


1602-1602: Multiple headings with the same content

(MD024, no-duplicate-heading)


1651-1651: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1663-1663: Multiple headings with the same content

(MD024, no-duplicate-heading)


1665-1665: Multiple headings with the same content

(MD024, no-duplicate-heading)


1667-1667: Multiple headings with the same content

(MD024, no-duplicate-heading)


1669-1669: Unordered list indentation
Expected: 0; Actual: 1

(MD007, ul-indent)


1671-1671: Multiple headings with the same content

(MD024, no-duplicate-heading)


1690-1690: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


1720-1720: Multiple headings with the same content

(MD024, no-duplicate-heading)


1734-1734: Multiple headings with the same content

(MD024, no-duplicate-heading)


1744-1744: Multiple headings with the same content

(MD024, no-duplicate-heading)


1754-1754: Multiple headings with the same content

(MD024, no-duplicate-heading)


1758-1758: Multiple headings with the same content

(MD024, no-duplicate-heading)


1760-1760: Multiple headings with the same content

(MD024, no-duplicate-heading)


1762-1762: Multiple headings with the same content

(MD024, no-duplicate-heading)


1764-1764: Multiple headings with the same content

(MD024, no-duplicate-heading)


1768-1768: Multiple headings with the same content

(MD024, no-duplicate-heading)


1772-1772: Multiple headings with the same content

(MD024, no-duplicate-heading)


1774-1774: Multiple headings with the same content

(MD024, no-duplicate-heading)


1776-1776: Multiple headings with the same content

(MD024, no-duplicate-heading)


1780-1780: Multiple headings with the same content

(MD024, no-duplicate-heading)


1784-1784: Multiple headings with the same content

(MD024, no-duplicate-heading)


1788-1788: Multiple headings with the same content

(MD024, no-duplicate-heading)


1792-1792: Multiple headings with the same content

(MD024, no-duplicate-heading)


1796-1796: Multiple headings with the same content

(MD024, no-duplicate-heading)


1800-1800: Multiple headings with the same content

(MD024, no-duplicate-heading)


1810-1810: Multiple headings with the same content

(MD024, no-duplicate-heading)


1814-1814: Multiple headings with the same content

(MD024, no-duplicate-heading)


1820-1820: Multiple headings with the same content

(MD024, no-duplicate-heading)


1822-1822: Multiple headings with the same content

(MD024, no-duplicate-heading)


1824-1824: Multiple headings with the same content

(MD024, no-duplicate-heading)


1828-1828: Multiple headings with the same content

(MD024, no-duplicate-heading)


1836-1836: Multiple headings with the same content

(MD024, no-duplicate-heading)


1840-1840: Multiple headings with the same content

(MD024, no-duplicate-heading)


1848-1848: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


1878-1878: Multiple headings with the same content

(MD024, no-duplicate-heading)


1884-1884: Multiple headings with the same content

(MD024, no-duplicate-heading)


1888-1888: Multiple headings with the same content

(MD024, no-duplicate-heading)


1892-1892: Multiple headings with the same content

(MD024, no-duplicate-heading)


1900-1900: Multiple headings with the same content

(MD024, no-duplicate-heading)


1904-1904: Multiple headings with the same content

(MD024, no-duplicate-heading)


1908-1908: Multiple headings with the same content

(MD024, no-duplicate-heading)


1910-1910: Multiple headings with the same content

(MD024, no-duplicate-heading)


1912-1912: Multiple headings with the same content

(MD024, no-duplicate-heading)


1916-1916: Multiple headings with the same content

(MD024, no-duplicate-heading)


1924-1924: Multiple headings with the same content

(MD024, no-duplicate-heading)


1928-1928: Multiple headings with the same content

(MD024, no-duplicate-heading)


1936-1936: Multiple headings with the same content

(MD024, no-duplicate-heading)


1940-1940: Multiple headings with the same content

(MD024, no-duplicate-heading)


1946-1946: Multiple headings with the same content

(MD024, no-duplicate-heading)


1957-1957: Heading levels should only increment by one level at a time
Expected: h3; Actual: h4

(MD001, heading-increment)


1981-1981: Multiple headings with the same content

(MD024, no-duplicate-heading)


1987-1987: Multiple headings with the same content

(MD024, no-duplicate-heading)


1997-1997: Multiple headings with the same content

(MD024, no-duplicate-heading)


2003-2003: Multiple headings with the same content

(MD024, no-duplicate-heading)


2009-2009: Multiple headings with the same content

(MD024, no-duplicate-heading)


2013-2013: Multiple headings with the same content

(MD024, no-duplicate-heading)


2027-2027: Multiple headings with the same content

(MD024, no-duplicate-heading)


2033-2033: Multiple headings with the same content

(MD024, no-duplicate-heading)


2039-2039: Multiple headings with the same content

(MD024, no-duplicate-heading)


2047-2047: Multiple headings with the same content

(MD024, no-duplicate-heading)


2053-2053: Multiple headings with the same content

(MD024, no-duplicate-heading)


2061-2061: Multiple headings with the same content

(MD024, no-duplicate-heading)


2067-2067: Multiple headings with the same content

(MD024, no-duplicate-heading)


2071-2071: Multiple headings with the same content

(MD024, no-duplicate-heading)


2075-2075: Multiple headings with the same content

(MD024, no-duplicate-heading)


2079-2079: Multiple headings with the same content

(MD024, no-duplicate-heading)


2083-2083: Multiple headings with the same content

(MD024, no-duplicate-heading)


2089-2089: Multiple headings with the same content

(MD024, no-duplicate-heading)


2093-2093: Multiple headings with the same content

(MD024, no-duplicate-heading)


2097-2097: Multiple headings with the same content

(MD024, no-duplicate-heading)


2101-2101: Multiple headings with the same content

(MD024, no-duplicate-heading)


2105-2105: Multiple headings with the same content

(MD024, no-duplicate-heading)


2109-2109: Multiple headings with the same content

(MD024, no-duplicate-heading)


2113-2113: Multiple headings with the same content

(MD024, no-duplicate-heading)


2117-2117: Multiple headings with the same content

(MD024, no-duplicate-heading)


2126-2126: Bare URL used

(MD034, no-bare-urls)


2128-2128: Bare URL used

(MD034, no-bare-urls)


2130-2130: Bare URL used

(MD034, no-bare-urls)


2132-2132: Bare URL used

(MD034, no-bare-urls)


2136-2136: Bare URL used

(MD034, no-bare-urls)


2138-2138: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (8)
scripts/build-mcpb.cjs (1)

109-120: LGTM! Excellent refactoring to reduce duplication.

Sourcing dependencies directly from package.json eliminates the need to maintain a hardcoded list and ensures the bundle always reflects the actual npm package dependencies.

test/samples/URL Sample.md (1)

1-7: LGTM! Simple test sample.

This provides a basic URL-related PDF test sample with placeholder content.

test/samples/01_sample_simple.pdf.md (1)

1-13: LGTM! Clean baseline example.

This serves as a minimal PDF sample demonstrating basic markdown features including headers, text formatting, and code blocks.

src/server.ts (1)

402-404: LGTM! Clear guidance for users.

The documentation addition effectively directs users to the new PDF styling best practices prompt, improving discoverability of this helpful resource.

test/samples/02_sample_invoice.pdf.md (1)

1-37: LGTM! Useful invoice example.

This provides a realistic business document sample for testing PDF generation with structured data like billing information and line items.

src/data/onboarding-prompts.json (2)

2-3: LGTM! Appropriate version bump and description update.

The minor version increment (2.0.0 → 2.1.0) is correct for adding new functionality, and the updated description accurately reflects the expanded scope to include best practices in addition to onboarding prompts.


5-17: LGTM! Well-structured and comprehensive PDF styling guidance.

The new bp_pdf_styling prompt is properly formatted with all required metadata fields and provides valuable guidance on:

  • Layout techniques (tables over flexbox)
  • Page break handling
  • Rounded corner workarounds
  • Background color behavior
  • Card and dark section patterns
  • Color palette recommendations

The content is practical and addresses common PDF rendering pitfalls.

test/samples/03_sample_compex.pdf.md (1)

1-2142: LGTM! Excellent complex test case.

This comprehensive academic paper provides an ideal test sample for complex PDF generation, including:

  • Mathematical equations and formulas
  • Multi-level headings
  • Tables and structured data
  • Academic formatting

The complexity helps validate PDF rendering for sophisticated documents.

@@ -0,0 +1,2142 @@
# arXiv:2302.11942v3 [q-fin.MF] 10 Mar 2023
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the filename typo.

The file is named 03_sample_compex.pdf.md but should be 03_sample_complex.pdf.md ("complex" not "compex").

Rename the file to correct the spelling:

#!/bin/bash
# Verify the file exists with the typo
fd -t f "03_sample_compex.pdf.md"

# Show that "complex" is the intended word
echo "Current filename has typo: compex → should be: complex"
🤖 Prompt for AI Agents
In test/samples/03_sample_compex.pdf.md around line 1 the filename contains a
typo ("compex" instead of "complex"); rename the file to
test/samples/03_sample_complex.pdf.md and update any references (imports, links,
tests) that point to the old filename so they use the corrected name.

- Document pdf_options in write_pdf tool description
- Add pdf_options section to bp_pdf_styling prompt
- Supports: format (A4/Letter/etc), landscape, margin
- height: 100vh + box-sizing: border-box for full-page backgrounds
- printBackground: true required for background colors
- margin: 0 for edge-to-edge layouts
- Simplified and reorganized sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant