{
 "kind": "tool",
 "slug": "xhtml2pdf",
 "path": "tools/xhtml2pdf/",
 "name": "xhtml2pdf",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Files, images and media",
   "tools/files-media/"
  ]
 ],
 "lead": "Turns HTML and CSS into PDF in pure Python, for invoices, reports and other templates.",
 "chips": [
  {
   "label": "Files, images and media",
   "path": "tools/files-media/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install xhtml2pdf"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/xhtml2pdf/xhtml2pdf"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "Apache-2.0",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI license expression.",
   "src": "https://github.com/xhtml2pdf/xhtml2pdf"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 23, 2026. ",
   "src": "https://github.com/xhtml2pdf/xhtml2pdf"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "Not in our scan",
   "status": "info",
   "sub": "#254 of 281 in its category",
   "note": "Dependency in 0 public GitHub projects set up for AI coding agents that we scanned (0.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What xhtml2pdf does",
   "parts": [
    {
     "t": "prose",
     "text": "Turns HTML and CSS into PDF in pure Python, for invoices, reports and other templates."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "xhtml2pdf popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "41",
       "of": "/ 100",
       "l": "Gid Score, #3024 overall"
      },
      {
       "n": "928K",
       "l": "downloads a week, pypi"
      },
      {
       "n": "2,402",
       "l": "GitHub stars"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How xhtml2pdf is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "AgentGid editors added xhtml2pdf to the catalog as a well-known library for PDF. In our scan it appears in 11 public GitHub projects, 0 of them set up for AI coding agents, so there is too little project data to rank it against the tools people use most.",
      "The most used alternative in our scan is ReportLab (25 projects).",
      "Projects that use it most often also use NumPy (72.7%), Pydantic (72.7%), SQLAlchemy (72.7%)."
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 72.7% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 72.7% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 72.7% of its projects",
       "v": "SQLAlchemy",
       "path": "tools/sqlalchemy/"
      },
      {
       "l": "In 63.6% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 63.6% of its projects",
       "v": "pandas",
       "path": "tools/pandas/"
      },
      {
       "l": "In 63.6% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 63.6% of its projects",
       "v": "Markdown",
       "path": "tools/markdown/"
      },
      {
       "l": "In 54.5% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about xhtml2pdf",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Patreon: https://patreon.com/xhtml2pdf",
        "Own page: https://blockstream.info/address/bc1qmr0skzwx5scyvh2ql28f7gfh6l65ua250qv227"
       ]
      },
      {
       "title": "More in Files, images and media",
       "path": "tools/files-media/",
       "items": [
        {
         "text": "Sharp",
         "path": "tools/sharp/"
        },
        {
         "text": "Pillow",
         "path": "tools/pillow/"
        },
        {
         "text": "Nodemailer",
         "path": "tools/nodemailer/"
        },
        {
         "text": "jsPDF",
         "path": "tools/jspdf/"
        },
        {
         "text": "SheetJS",
         "path": "tools/xlsx/"
        },
        {
         "text": "qrcode (JavaScript)",
         "path": "tools/qrcode-npm/"
        },
        {
         "text": "JSZip",
         "path": "tools/jszip/"
        },
        {
         "text": "PDF.js",
         "path": "tools/pdfjs-dist/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "xhtml2pdf",
       "me": true,
       "facts": [
        "Apache-2.0",
        "Gid 41",
        "928K/wk"
       ]
      },
      {
       "name": "ReportLab",
       "why": "Python library for generating PDFs and graphics programmatically.",
       "path": "tools/reportlab/",
       "facts": [
        "BSD",
        "Gid 70",
        "25.4M/wk"
       ]
      }
     ],
     "more": "Compare xhtml2pdf with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install xhtml2pdf"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for xhtml2pdf yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi xhtml2pdf"
  ],
  [
   "Category",
   "Files, images and media"
  ],
  [
   "License",
   "Apache-2.0"
  ],
  [
   "Gid Score",
   "41.0"
  ],
  [
   "Rank in category",
   "#254 of 281"
  ],
  [
   "GitHub",
   "xhtml2pdf/xhtml2pdf"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/xhtml2pdf.png"
}