xiaohongshu
xiaohongshu
html-to-pdf
Converts HTML files to PDF or PNG format. Use this skill when the user asks to convert, export, or generate PDF/PNG from HTML files, or when they want to create printable documents, presentations, or long-form images from web pages or HTML reports.
Full skill instructions
This skill helps you convert HTML files to PDF or PNG format with various options for output quality and page layout.
Use this skill when the user wants to:
Best for: Printing, archiving, traditional documents
Command:
python html_to_pdf_final.py input.html output.pdf
Features:
Best for: Online viewing, presentations, no page breaks
Command:
python html_to_long_image.py input.html
Features:
.png and .pdfBest for: Fallback options, compatibility
Command:
python html_to_pdf_converter.py input.html output.pdf
Features:
The skill requires Playwright and Pillow. The scripts auto-install dependencies if missing:
pip install playwright pillow pypdf
playwright install chromium
Verify the HTML file exists:
ls -la *.html
Run the converter:
python html_to_pdf_final.py your_file.html
Open the result:
open your_file_final.pdf
Verify the HTML file exists:
ls -la *.html
Run the long image converter:
python html_to_long_image.py your_file.html
Check outputs:
# View the PNG screenshot
open your_file_fullpage.png
# View the PDF version
open your_file_fullpage.pdf
Solution:
playwright install chromium
Solution: Use the long image method instead:
python html_to_long_image.py your_file.html
Causes & Solutions:
Solution: Use the long image method which uses screenshot instead of PDF rendering:
python html_to_long_image.py your_file.html
After conversion, you'll get:
Multi-Page PDF:
filename_final.pdf - Standard A4 multi-page PDFLong Image Method:
filename_fullpage.png - Complete screenshot as PNG (6-10 MB)filename_fullpage.pdf - Single-page PDF from image (1-2 MB)For online viewing/presentations: Use html_to_long_image.py
For printing/archiving: Use html_to_pdf_final.py
For complex CSS: Use html_to_pdf_converter.py
All scripts should be in the project directory:
html_to_pdf_final.py - Main multi-page converterhtml_to_long_image.py - Long image generatorhtml_to_pdf_converter.py - Advanced multi-method converterpython html_to_pdf_final.py 202510_Alpha_Intelligence_BP.html
# Output: 202510_Alpha_Intelligence_BP_final.pdf (22 pages, 5.7 MB)
python html_to_long_image.py 202510_Alpha_Intelligence_BP.html
# Output:
# - 202510_Alpha_Intelligence_BP_fullpage.png (6.1 MB)
# - 202510_Alpha_Intelligence_BP_fullpage.pdf (1.6 MB, 1 page)
for file in *.html; do
python html_to_long_image.py "$file"
done
python html_to_pdf_final.py input.html custom_output.pdf
python html_to_long_image.py input.html
python -c "from pypdf import PdfReader; r = PdfReader('output.pdf'); print(f'Pages: {len(r.pages)}')"
ls -lh *.pdf *.png
A successful conversion should:
| Need | Use | Output |
|---|---|---|
| Printing | html_to_pdf_final.py | Multi-page A4 PDF |
| Online viewing | html_to_long_image.py | Single-page PDF + PNG |
| Maximum compatibility | html_to_pdf_converter.py | Multi-page PDF with fallbacks |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience