{
  "id": "task_libraries:pdf/javascript",
  "path": "/exapedia/javascript-pdf-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript PDF libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript PDF libraries create PDF files, and some also modify existing PDFs.\n\n"
    },
    {
      "t": "link",
      "href": "#jspdf",
      "label": [
        {
          "t": "fact",
          "fact": "F134"
        }
      ]
    },
    {
      "t": "text",
      "text": ", "
    },
    {
      "t": "link",
      "href": "#pdfkit",
      "label": [
        {
          "t": "fact",
          "fact": "F149"
        }
      ]
    },
    {
      "t": "text",
      "text": ", "
    },
    {
      "t": "link",
      "href": "#pdfmake",
      "label": [
        {
          "t": "fact",
          "fact": "F181"
        }
      ]
    },
    {
      "t": "text",
      "text": ", and "
    },
    {
      "t": "link",
      "href": "#react-pdf-renderer",
      "label": [
        {
          "t": "fact",
          "fact": "F164"
        }
      ]
    },
    {
      "t": "text",
      "text": " generate new documents from drawing calls, a document definition, or React components. "
    },
    {
      "t": "link",
      "href": "#pdf-lib",
      "label": [
        {
          "t": "fact",
          "fact": "F119"
        }
      ]
    },
    {
      "t": "text",
      "text": ", its fork "
    },
    {
      "t": "link",
      "href": "#cantoo-pdf-lib",
      "label": [
        {
          "t": "fact",
          "fact": "F196"
        }
      ]
    },
    {
      "t": "text",
      "text": ", and "
    },
    {
      "t": "link",
      "href": "#libpdf-core",
      "label": [
        {
          "t": "fact",
          "fact": "F232"
        }
      ]
    },
    {
      "t": "text",
      "text": " load an existing PDF to fill its forms, copy its pages, or add content. "
    },
    {
      "t": "link",
      "href": "#htmltwopdf-js",
      "label": [
        {
          "t": "fact",
          "fact": "F214"
        }
      ]
    },
    {
      "t": "text",
      "text": " turns a rendered web page into a PDF inside the browser. These libraries produce the invoices, tickets, and reports that apps generate for download."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript PDF libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pdf-lib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F119"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F120"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F123"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F121"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jspdf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F134"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pdfkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#react-pdf-renderer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pdfmake",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cantoo-pdf-lib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#htmltwopdf-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#libpdf-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F232"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#pdf-lib",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Node.js generation",
            "Password encryption"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pdf-lib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F119"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jspdf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F134"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pdfkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#react-pdf-renderer",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pdfmake",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F181"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cantoo-pdf-lib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F196"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#htmltwopdf-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#libpdf-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F232"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "pdf-lib",
          "name": [
            {
              "t": "fact",
              "fact": "F119"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Hopding/pdf-lib"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/pdf-lib"
            },
            {
              "label": "Docs",
              "href": "https://pdf-lib.js.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "pdf-lib creates new PDFs and modifies existing ones, and runs in Node.js, browsers, Deno, and React Native. A loaded document can gain, lose, or reorder pages, copy pages from another PDF, and take new text, images, and SVG paths. The form API creates fields, fills them, and flattens them into page content. Custom fonts embed once the separate "
            },
            {
              "t": "code",
              "text": "@pdf-lib/fontkit"
            },
            {
              "t": "text",
              "text": " package is registered. Encrypted PDFs are outside its support."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F120"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F126"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F122"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F121"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pdf-lib.js.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F119"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F21"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F22"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F132"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/alam00000/bentopdf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F132"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async function extractPages() {\n  const pagesInput = document.getElementById(\n    'pages-to-extract'\n  ) as HTMLInputElement;\n  if (!pagesInput || !pagesInput.value.trim()) {\n    showAlert('No Pages', 'Please enter page numbers to extract.');\n    return;\n  }\n\n  const pagesToExtract = parsePageRanges(\n    pagesInput.value,\n    extractState.totalPages\n  ).map((i) => i + 1);\n  if (pagesToExtract.length === 0) {\n    showAlert('Invalid Pages', 'No valid page numbers found.');\n    return;\n  }\n\n  showLoader('Extracting pages...');\n\n  try {\n    const zip = new JSZip();\n    const baseName = extractState.file?.name.replace('.pdf', '') || 'document';\n\n    for (const pageNum of pagesToExtract) {\n      const newPdf = await PDFDocument.create();\n      const [copiedPage] = await newPdf.copyPages(extractState.pdfDoc, [\n        pageNum - 1,\n      ]);\n      newPdf.addPage(copiedPage);\n      const pdfBytes = await newPdf.save();\n      zip.file(`${baseName}_page_${pageNum}.pdf`, pdfBytes);\n    }\n\n    const zipBlob = await zip.generateAsync({ type: 'blob' });\n    downloadFile(zipBlob, `${baseName}_extracted_pages.zip`);\n\n    hideLoader();\n    showAlert(\n      'Success',\n      trText('Extracted {{length}} page(s) successfully!', {\n        length: pagesToExtract.length,\n      }),\n      'success',\n      () => {\n        resetState();\n      }\n    );\n  } catch (error) {\n    console.error('Error extracting pages:', error);\n    hideLoader();\n    showAlert('Error', 'Failed to extract pages.');\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/alam00000/bentopdf/blob/18c4aac8bce50cd449982d65b08f7f7abbd0e2cf/src/js/logic/extract-pages-page.ts#L161-L214",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F131"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20pdf-lib&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F119"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import {PDFDocument} from 'pdf-lib'\n\nconst pdfDoc = await PDFDocument.create()\nconst page = pdfDoc.addPage()\npage.drawText('Hello world!', {x: 50, y: 700, size: 20})\nconst pdfBytes = await pdfDoc.save()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/Hopding/pdf-lib/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F124"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jspdf",
          "name": [
            {
              "t": "fact",
              "fact": "F134"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/parallax/jsPDF"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/jspdf"
            },
            {
              "label": "Docs",
              "href": "https://parallax.github.io/jsPDF/docs/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "jsPDF generates PDF documents from drawing commands in the browser or Node.js. "
            },
            {
              "t": "code",
              "text": "new jsPDF()"
            },
            {
              "t": "text",
              "text": " starts a portrait page measured in millimeters, "
            },
            {
              "t": "code",
              "text": "doc.text"
            },
            {
              "t": "text",
              "text": " places a string at a position, and "
            },
            {
              "t": "code",
              "text": "doc.save"
            },
            {
              "t": "text",
              "text": " writes the file, as a download in the browser and to disk in Node.js. Options set the paper size, orientation, and unit. The "
            },
            {
              "t": "code",
              "text": "html"
            },
            {
              "t": "text",
              "text": " method converts an HTML element into PDF content, and a bundled table API turns rows of data into a table."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://parallax.github.io/jsPDF/docs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F134"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F47"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F48"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F49"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F50"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F51"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/drawdb-io/drawdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F147"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "() => {\n              const canvas = document.getElementById(\"canvas\");\n              const filename = `${title}_${new Date().toISOString()}`;\n              toJpeg(canvas).then(function (dataUrl) {\n                const doc = new jsPDF(\"l\", \"px\", [\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                ]);\n                doc.addImage(\n                  dataUrl,\n                  \"jpeg\",\n                  0,\n                  0,\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                );\n                doc.save(`${filename}.pdf`);\n              });\n            }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/drawdb-io/drawdb/blob/b74fb57464c732179b88b6959c96ce451f5a614d/src/components/EditorHeader/ControlPanel.jsx#L1714-L1732",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F146"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20jspdf&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F134"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { jsPDF } from \"jspdf\";\n\n// Default export is a4 paper, portrait, using millimeters for units\nconst doc = new jsPDF();\n\ndoc.text(\"Hello world!\", 10, 10);\ndoc.save(\"a4.pdf\");\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/parallax/jsPDF/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F139"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pdfkit",
          "name": [
            {
              "t": "fact",
              "fact": "F149"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/foliojs/pdfkit"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/pdfkit"
            },
            {
              "label": "Docs",
              "href": "https://pdfkit.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "PDFKit generates multi-page PDFs in Node.js and the browser through a chainable API. A "
            },
            {
              "t": "code",
              "text": "PDFDocument"
            },
            {
              "t": "text",
              "text": " streams its output, so a file or an HTTP response receives the PDF as it is written. Drawing calls follow the HTML canvas API, and text wraps across lines with alignment and bulleted lists. Fonts embed with subsetting from TrueType, OpenType, and WOFF files. Documents can also carry tables, annotations, form fields, outlines, encryption, and the tagged structure that accessible PDFs use."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pdfkit.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F149"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F73"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F74"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F75"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F76"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F77"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F78"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/natancabral/pdfkit-table",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "addBackground(\n      { x, y, width, height }: Rect,\n      fillColor?: string,\n      fillOpacity?: number,\n      callback?: (doc: this) => void,\n    ): void {\n      fillColor ||= \"grey\";\n      fillOpacity ||= 0.1;\n\n      this.save();\n      this.fill(fillColor)\n        .fillOpacity(fillOpacity)\n        .rect(x, y, width, height)\n        .fill();\n      this.restore();\n\n      typeof callback === \"function\" && callback(this);\n    }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/natancabral/pdfkit-table/blob/main/src/document.ts#L55-L72",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F161"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20pdfkit&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F149"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const PDFDocument = require('pdfkit');\nconst fs = require('fs');\nconst doc = new PDFDocument();\ndoc.pipe(fs.createWriteStream('output.pdf'));\ndoc.text('Hello world!');\ndoc.end();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pdfkit.org/docs/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting_started.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F154"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "react-pdf-renderer",
          "name": [
            {
              "t": "fact",
              "fact": "F164"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/diegomura/react-pdf"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@react-pdf/renderer"
            },
            {
              "label": "Docs",
              "href": "https://react-pdf.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "@react-pdf/renderer builds PDFs from React components, in the browser and on the server. A document is written with "
            },
            {
              "t": "code",
              "text": "Document"
            },
            {
              "t": "text",
              "text": ", "
            },
            {
              "t": "code",
              "text": "Page"
            },
            {
              "t": "text",
              "text": ", "
            },
            {
              "t": "code",
              "text": "View"
            },
            {
              "t": "text",
              "text": ", and "
            },
            {
              "t": "code",
              "text": "Text"
            },
            {
              "t": "text",
              "text": " components and styled through "
            },
            {
              "t": "code",
              "text": "StyleSheet.create"
            },
            {
              "t": "text",
              "text": " with CSS-like properties such as flex direction and margin. In the browser, "
            },
            {
              "t": "code",
              "text": "PDFViewer"
            },
            {
              "t": "text",
              "text": " shows the result in the page. On the server, "
            },
            {
              "t": "code",
              "text": "ReactPDF.render"
            },
            {
              "t": "text",
              "text": " writes it to a file. The package only creates PDFs, and the separate react-pdf package displays existing ones."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://react-pdf.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/xitanggg/open-resume",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F179"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "tsx",
              "code": "export const ResumePDF = ({\n  resume,\n  settings,\n  isPDF = false,\n}: {\n  resume: Resume;\n  settings: Settings;\n  isPDF?: boolean;\n}) => {\n  const { profile, workExperiences, educations, projects, skills, custom } =\n    resume;\n  const { name } = profile;\n  const {\n    fontFamily,\n    fontSize,\n    documentSize,\n    formToHeading,\n    formToShow,\n    formsOrder,\n    showBulletPoints,\n  } = settings;\n  const themeColor = settings.themeColor || DEFAULT_FONT_COLOR;\n\n  const showFormsOrder = formsOrder.filter((form) => formToShow[form]);\n\n  const formTypeToComponent: { [type in ShowForm]: () => JSX.Element } = {\n    workExperiences: () => (\n      <ResumePDFWorkExperience\n        heading={formToHeading[\"workExperiences\"]}\n        workExperiences={workExperiences}\n        themeColor={themeColor}\n      />\n    ),\n    educations: () => (\n      <ResumePDFEducation\n        heading={formToHeading[\"educations\"]}\n        educations={educations}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"educations\"]}\n      />\n    ),\n    projects: () => (\n      <ResumePDFProject\n        heading={formToHeading[\"projects\"]}\n        projects={projects}\n        themeColor={themeColor}\n      />\n    ),\n    skills: () => (\n      <ResumePDFSkills\n        heading={formToHeading[\"skills\"]}\n        skills={skills}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"skills\"]}\n      />\n    ),\n    custom: () => (\n      <ResumePDFCustom\n        heading={formToHeading[\"custom\"]}\n        custom={custom}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"custom\"]}\n      />\n    ),\n  };\n\n  return (\n    <>\n      <Document title={`${name} Resume`} author={name} producer={\"OpenResume\"}>\n        <Page\n          size={documentSize === \"A4\" ? \"A4\" : \"LETTER\"}\n          style={{\n            ...styles.flexCol,\n            color: DEFAULT_FONT_COLOR,\n            fontFamily,\n            fontSize: fontSize + \"pt\",\n          }}\n        >\n          {Boolean(settings.themeColor) && (\n            <View\n              style={{\n                width: spacing[\"full\"],\n                height: spacing[3.5],\n                backgroundColor: themeColor,\n              }}\n            />\n          )}\n          <View\n            style={{\n              ...styles.flexCol,\n              padding: `${spacing[0]} ${spacing[20]}`,\n            }}\n          >\n            <ResumePDFProfile\n              profile={profile}\n              themeColor={themeColor}\n              isPDF={isPDF}\n            />\n            {showFormsOrder.map((form) => {\n              const Component = formTypeToComponent[form];\n              return <Component key={form} />;\n            })}\n          </View>\n        </Page>\n      </Document>\n      <SuppressResumePDFErrorMessage />\n    </>\n  );\n};\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/xitanggg/open-resume/blob/4f8255a2c763479837f69f1dccf2a3338730cd79/src/app/components/Resume/ResumePDF/index.tsx#L29-L137",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F178"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40react-pdf/renderer%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F164"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "tsx",
              "code": "import React from 'react';\nimport ReactPDF, {Document, Page, Text} from '@react-pdf/renderer';\n\nconst MyDocument = () => (\n  <Document><Page size=\"A4\"><Text>Hello world!</Text></Page></Document>\n);\nReactPDF.render(<MyDocument />, './example.pdf');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/diegomura/react-pdf/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F169"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pdfmake",
          "name": [
            {
              "t": "fact",
              "fact": "F181"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/bpampuch/pdfmake"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/pdfmake"
            },
            {
              "label": "Docs",
              "href": "https://pdfmake.github.io/docs/0.3/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "pdfmake builds PDFs from a document definition, a JavaScript object that lists content and styles, in Node.js and browsers. The library works out the layout: line wrapping, lists, columns, and tables with column and row spans and header rows that repeat after a page break. Definitions also set page headers and footers, a table of contents, watermarks, and QR codes. "
            },
            {
              "t": "code",
              "text": "createPdf"
            },
            {
              "t": "text",
              "text": " turns a definition into a file that downloads, opens, or prints in the browser."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pdfmake.github.io/docs/0.3/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F98"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F99"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/DataTables/Buttons",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function (e, dt, button, config, cb) {\n\t\tvar data = dt.buttons.exportData(config.exportOptions);\n\t\tvar info = dt.buttons.exportInfo(config as any); // Need better typing\n\t\tvar rows = [];\n\n\t\tif (config.header) {\n\t\t\tdata.headerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableHeader'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tfor (var i = 0, ien = data.body.length; i < ien; i++) {\n\t\t\trows.push(\n\t\t\t\tdata.body[i].map(function (d) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\td === null || d === undefined\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: typeof d === 'string'\n\t\t\t\t\t\t\t\t? d\n\t\t\t\t\t\t\t\t: (d as any).toString()\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\n\t\tif (config.footer) {\n\t\t\tdata.footerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableFooter'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tvar doc: any = {\n\t\t\tpageSize: config.pageSize,\n\t\t\tpageOrientation: config.orientation,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\tstyle: 'table',\n\t\t\t\t\ttable: {\n\t\t\t\t\t\theaderRows: config.header\n\t\t\t\t\t\t\t? data.headerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tfooterRows: config.footer // Used for styling, doesn't do anything in pdfmake\n\t\t\t\t\t\t\t? data.footerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tbody: rows\n\t\t\t\t\t},\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\thLineWidth: function (i: number, node: any) {\n\t\t\t\t\t\t\tif (i === 0 || i === node.table.body.length) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 0.5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvLineWidth: function () {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t},\n\t\t\t\t\t\thLineColor: function (i: number, node: any) {\n\t\t\t\t\t\t\treturn i === node.table.headerRows ||\n\t\t\t\t\t\t\t\ti ===\n\t\t\t\t\t\t\t\t\tnode.table.body.length -\n\t\t\t\t\t\t\t\t\t\tnode.table.footerRows\n\t\t\t\t\t\t\t\t? '#333'\n\t\t\t\t\t\t\t\t: '#ddd';\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfillColor: function (rowIndex: number) {\n\t\t\t\t\t\t\tif (rowIndex < data.headerStructure.length) {\n\t\t\t\t\t\t\t\treturn '#fff';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn rowIndex % 2 === 0 ? '#f3f3f3' : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingTop: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingBottom: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\ttableHeader: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttableFooter: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttable: {\n\t\t\t\t\tmargin: [0, 5, 0, 5]\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\talignment: 'center',\n\t\t\t\t\tfontSize: 13\n\t\t\t\t},\n\t\t\t\tmessage: {}\n\t\t\t},\n\t\t\tdefaultStyle: {\n\t\t\t\tfontSize: 10\n\t\t\t}\n\t\t};\n\n\t\tif (info.messageTop) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.messageTop,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.messageBottom) {\n\t\t\tdoc.content.push({\n\t\t\t\ttext: info.messageBottom,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.title) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.title,\n\t\t\t\tstyle: 'title',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (config.customize) {\n\t\t\tconfig.customize(doc, config, dt);\n\t\t}\n\n\t\tvar pdf = DataTable.Buttons.pdfMake().createPdf(doc);\n\n\t\tif (config.download === 'open') {\n\t\t\tpdf.open();\n\t\t}\n\t\telse {\n\t\t\tpdf.download(info.filename);\n\t\t}\n\n\t\tcb();\n\t}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/DataTables/Buttons/blob/964ce7e0da2845455dfd1dfd07163fdb29b59dbd/js/buttons/pdf.ts#L30-L195",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20pdfmake&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F181"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import pdfMake from 'pdfmake/build/pdfmake';\nimport pdfFonts from 'pdfmake/build/vfs_fonts';\npdfMake.addVirtualFileSystem(pdfFonts);\npdfMake.createPdf({ content: 'Hello world!' }).download('document.pdf');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pdfmake.github.io/docs/0.3/getting-started/client-side/",
                  "label": [
                    {
                      "t": "text",
                      "text": "client-side docs"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F186"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "cantoo-pdf-lib",
          "name": [
            {
              "t": "fact",
              "fact": "F196"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/cantoo-scribe/pdf-lib"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@cantoo/pdf-lib"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "@cantoo/pdf-lib is a maintained fork of pdf-lib that keeps the original API and adds features the original lacks. It draws full SVG images rather than only SVG paths, and "
            },
            {
              "t": "code",
              "text": "extractContents"
            },
            {
              "t": "text",
              "text": " pulls text and images out of a page. Incremental updates append changes without rewriting the whole file, which signing workflows depend on. The fork also recovers truncated PDFs that the original rejects."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/cantoo-scribe/pdf-lib",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/modelcontextprotocol/ext-apps",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F212"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "tsx",
              "code": "function makeQuadPoints(\n  context: PDFDocument[\"context\"],\n  rects: Rect[],\n): PDFArray {\n  const arr = PDFArray.withContext(context);\n  for (const r of rects) {\n    const x1 = r.x;\n    const y1 = r.y;\n    const x2 = r.x + r.width;\n    const y2 = r.y + r.height;\n    // QuadPoints order: top-left, top-right, bottom-left, bottom-right\n    arr.push(PDFNumber.of(x1));\n    arr.push(PDFNumber.of(y2)); // top-left\n    arr.push(PDFNumber.of(x2));\n    arr.push(PDFNumber.of(y2)); // top-right\n    arr.push(PDFNumber.of(x1));\n    arr.push(PDFNumber.of(y1)); // bottom-left\n    arr.push(PDFNumber.of(x2));\n    arr.push(PDFNumber.of(y1)); // bottom-right\n  }\n  return arr;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/modelcontextprotocol/ext-apps/blob/ea3e9d0e624a20bc1c51310292f09d9b8ed17161/examples/pdf-server/src/pdf-annotations.ts#L453-L474",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40cantoo/pdf-lib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F196"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "tsx",
              "code": "import { PDFDocument } from '@cantoo/pdf-lib';\nconst doc = await PDFDocument.create();\nconst page = doc.addPage();\npage.drawText('Hello world!', { x: 50, y: 700 });\nconst bytes = await doc.save();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/cantoo-scribe/pdf-lib/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "htmltwopdf-js",
          "name": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/eKoopmans/html2pdf.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/html2pdf.js"
            },
            {
              "label": "Docs",
              "href": "https://ekoopmans.github.io/html2pdf.js/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F214"
            },
            {
              "t": "text",
              "text": " converts a web page or a single element into a PDF entirely in the browser. It draws the element onto a canvas with "
            },
            {
              "t": "fact",
              "fact": "F250"
            },
            {
              "t": "text",
              "text": " and places the resulting image into a document with jsPDF. One chained call takes the element and saves the file, and options set margins, page size, image quality, and page breaks. Text in the output is part of the image."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ekoopmans.github.io/html2pdf.js/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F214"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/kempsteven/vue-html2pdf",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F230"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "tsx",
              "code": "async downloadPdf () {\n\t\t\t// Set Element and Html2pdf.js Options\n\t\t\tconst pdfContent = this.$refs.pdfContent\n\t\t\tlet options = this.setOptions()\n\n\t\t\tthis.$emit('beforeDownload', { html2pdf, options, pdfContent })\n\n\t\t\tconst html2PdfSetup = html2pdf().set(options).from(pdfContent)\n\t\t\tlet pdfBlobUrl = null\n\n\t\t\tif (this.previewModal) {\n\t\t\t\tthis.pdfFile = await html2PdfSetup.output('bloburl')\n\t\t\t\tpdfBlobUrl = this.pdfFile\n\t\t\t}\n\n\t\t\tif (this.enableDownload) {\n\t\t\t\tpdfBlobUrl = await html2PdfSetup.save().output('bloburl')\n\t\t\t}\n\n\t\t\tif (pdfBlobUrl) {\n\t\t\t\tconst res = await fetch(pdfBlobUrl)\n\t\t\t\tconst blobFile = await res.blob()\n\t\t\t\tthis.$emit('hasDownloaded', blobFile)\n\t\t\t}\n\n\t\t\tthis.progress = 100\n\t\t}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/kempsteven/vue-html2pdf/blob/d608228f525477ed076a38f3a1ab3dd79cc9e420/src/vue-html2pdf.vue#L227-L253",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F229"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=html2pdf.js%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F214"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "tsx",
              "code": "import html2pdf from 'html2pdf.js';\nconst element = document.getElementById('element-to-print');\nhtml2pdf(element);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/eKoopmans/html2pdf.js/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F219"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "libpdf-core",
          "name": [
            {
              "t": "fact",
              "fact": "F232"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/LibPDF-js/core"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@libpdf/core"
            },
            {
              "label": "Docs",
              "href": "https://libpdf.dev/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "LibPDF is a TypeScript library that parses, modifies, and generates PDFs, with a parser that falls back gracefully on malformed files. It fills and flattens forms, merges and splits documents, extracts text with positions, and embeds fonts with subsetting. Encryption, digital signatures, and incremental saves that keep existing signatures valid are built in. Documenso, the company that wrote it, runs it in production, and the project labels itself beta software."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://libpdf.dev/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F232"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/papermark/papermark",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F248"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "tsx",
              "code": "export async function buildWatermarkedPdf({\n  fileBytes,\n  fileType,\n  watermarkConfig,\n  viewerData,\n  flatten = false,\n  onProgress,\n}: BuildWatermarkedPdfOptions): Promise<Uint8Array> {\n  let pdf: PDF;\n  let pages: PDFPage[];\n\n  if (fileType === \"image\") {\n    pdf = PDF.create();\n    let image;\n    try {\n      image = pdf.embedImage(fileBytes);\n    } catch (error) {\n      throw new Error(\n        `Unsupported image format for watermarking: ${\n          error instanceof Error ? error.message : String(error)\n        }`,\n      );\n    }\n    // Scale large images down so the watermark font-size cap (1000pt) doesn't\n    // shrink the watermark; the full-resolution image still embeds losslessly.\n    const MAX_IMAGE_PAGE_DIMENSION = 1000;\n    const longestSide = Math.max(image.widthInPoints, image.heightInPoints);\n    const scale =\n      longestSide > MAX_IMAGE_PAGE_DIMENSION\n        ? MAX_IMAGE_PAGE_DIMENSION / longestSide\n        : 1;\n    const widthPt = image.widthInPoints * scale;\n    const heightPt = image.heightInPoints * scale;\n    const page = pdf.addPage({ width: widthPt, height: heightPt });\n    page.drawImage(image, { x: 0, y: 0, width: widthPt, height: heightPt });\n    pages = [page];\n  } else {\n    pdf = await PDF.load(fileBytes);\n    pages = pdf.getPages();\n  }\n\n  for (let i = 0; i < pages.length; i++) {\n    insertWatermark(pages[i], watermarkConfig, viewerData);\n    if ((i + 1) % 25 === 0) {\n      onProgress?.(`Watermarked ${i + 1}/${pages.length} pages`);\n    }\n  }\n\n  if (flatten) {\n    // Flatten forms, annotations, and optional-content layers so nothing can\n    // be toggled/removed. Best-effort: never fail the download over this.\n    try {\n      pdf.flattenAll();\n      onProgress?.(\"Flattened form/annotation/layer content\");\n    } catch (error) {\n      onProgress?.(\n        `flattenAll failed, falling back to form flatten: ${\n          error instanceof Error ? error.message : String(error)\n        }`,\n      );\n      try {\n        pdf.getForm()?.flatten();\n      } catch {\n        // No form / unsupported – ignore.\n      }\n    }\n  }\n\n  return await pdf.save();\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/papermark/papermark/blob/1e269441/lib/utils/watermark-pdf.ts#L409-L478",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40libpdf/core%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F232"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "tsx",
              "code": "import { PDF } from \"@libpdf/core\";\n\nconst pdf = await PDF.load(bytes);\nconst pages = pdf.getPages();\n\nconsole.log(`${pages.length} pages`);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/LibPDF-js/core/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F237"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript PDF library should I use?",
      "a": [
        {
          "t": "text",
          "text": "To generate a PDF from code, use "
        },
        {
          "t": "link",
          "href": "#jspdf",
          "label": [
            {
              "t": "text",
              "text": "jsPDF"
            }
          ]
        },
        {
          "t": "text",
          "text": " for drawing calls or "
        },
        {
          "t": "link",
          "href": "#pdfmake",
          "label": [
            {
              "t": "text",
              "text": "pdfmake"
            }
          ]
        },
        {
          "t": "text",
          "text": " for a declarative layout with tables. To change an existing PDF or fill its forms, use "
        },
        {
          "t": "link",
          "href": "#pdf-lib",
          "label": [
            {
              "t": "text",
              "text": "pdf-lib"
            }
          ]
        },
        {
          "t": "text",
          "text": ". In a React app, use "
        },
        {
          "t": "link",
          "href": "#react-pdf-renderer",
          "label": [
            {
              "t": "text",
              "text": "@react-pdf/renderer"
            }
          ]
        },
        {
          "t": "text",
          "text": " to build the document from components."
        }
      ]
    },
    {
      "q": "What is jsPDF?",
      "a": [
        {
          "t": "link",
          "href": "#jspdf",
          "label": [
            {
              "t": "text",
              "text": "jsPDF"
            }
          ]
        },
        {
          "t": "text",
          "text": " generates PDFs from drawing commands in the browser and Node.js. It creates new documents only, and changing an existing PDF takes another library such as "
        },
        {
          "t": "link",
          "href": "#pdf-lib",
          "label": [
            {
              "t": "text",
              "text": "pdf-lib"
            }
          ]
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "q": "What is pdf-lib?",
      "a": [
        {
          "t": "link",
          "href": "#pdf-lib",
          "label": [
            {
              "t": "text",
              "text": "pdf-lib"
            }
          ]
        },
        {
          "t": "text",
          "text": " creates and modifies PDF documents in Node.js, browsers, Deno, and React Native. It edits existing files, fills and flattens forms, copies pages between documents, and embeds images and fonts."
        }
      ]
    },
    {
      "q": "What is pdfmake?",
      "a": [
        {
          "t": "link",
          "href": "#pdfmake",
          "label": [
            {
              "t": "text",
              "text": "pdfmake"
            }
          ]
        },
        {
          "t": "text",
          "text": " generates PDFs in Node.js and browsers from a declarative document definition. The definition lists paragraphs, tables, and styles, and pdfmake works out line wrapping, page breaks, and repeated table headers."
        }
      ]
    },
    {
      "q": "How do I generate a PDF in JavaScript?",
      "a": [
        {
          "t": "text",
          "text": "With "
        },
        {
          "t": "link",
          "href": "#jspdf",
          "label": [
            {
              "t": "text",
              "text": "jsPDF"
            }
          ]
        },
        {
          "t": "text",
          "text": ", create a document with "
        },
        {
          "t": "code",
          "text": "new jsPDF()"
        },
        {
          "t": "text",
          "text": ", add text with "
        },
        {
          "t": "code",
          "text": "doc.text"
        },
        {
          "t": "text",
          "text": ", and call "
        },
        {
          "t": "code",
          "text": "doc.save"
        },
        {
          "t": "text",
          "text": " to download or write the file. "
        },
        {
          "t": "link",
          "href": "#pdfmake",
          "label": [
            {
              "t": "text",
              "text": "pdfmake"
            }
          ]
        },
        {
          "t": "text",
          "text": " takes a document definition object instead and builds the layout from it."
        }
      ]
    },
    {
      "q": "How do I convert HTML to PDF in JavaScript?",
      "a": [
        {
          "t": "link",
          "href": "#htmltwopdf-js",
          "label": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ]
        },
        {
          "t": "text",
          "text": " converts a page or element in the browser by drawing it onto a canvas with "
        },
        {
          "t": "fact",
          "fact": "F250"
        },
        {
          "t": "text",
          "text": " and placing the image into a PDF with jsPDF. The "
        },
        {
          "t": "code",
          "text": "html"
        },
        {
          "t": "text",
          "text": " method in "
        },
        {
          "t": "link",
          "href": "#jspdf",
          "label": [
            {
              "t": "text",
              "text": "jsPDF"
            }
          ]
        },
        {
          "t": "text",
          "text": " does the same through "
        },
        {
          "t": "fact",
          "fact": "F250"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, pdf-lib",
      "display": "pdf-lib",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, pdf-lib",
      "display": "103.5M",
      "asOf": "2026-11-10"
    },
    "F3": {
      "label": "License, pdf-lib",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, pdf-lib",
      "display": "1.17.1, Nov 2021",
      "asOf": "2021-11-06"
    },
    "F5": {
      "label": "Package release date, pdf-lib",
      "display": "Nov 2021",
      "asOf": "2021-11-06"
    },
    "F6": {
      "label": "Repository stars, pdf-lib",
      "display": "8.7K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Read existing PDFs, pdf-lib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Fillable forms, pdf-lib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "HTML input, pdf-lib",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Output formats, pdf-lib",
      "display": "PDF",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, pdf-lib",
      "display": "npm install pdf-lib",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, pdf-lib",
      "display": "pdf-lib creates new PDFs and modifies existing ones, and runs in Node.js, browsers, Deno, and React Native. A loaded document can gain, lose, or reorder pages, copy pages from another PDF, and take new text, images, and SVG paths. The form API creates fields, fills them, and flattens them into page content. Custom fonts embed once the separate @pdf-lib/fontkit package is registered. Encrypted PDFs are outside its support.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, pdf-lib",
      "display": "Modifies existing PDF documents",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, pdf-lib",
      "display": "Load existing PDFs to add content, copy pages, and update form fields.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, pdf-lib",
      "display": "Creates and fills PDF forms",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, pdf-lib",
      "display": "Create fields or read and fill existing text fields and controls.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, pdf-lib",
      "display": "Page text editing is restricted",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, pdf-lib",
      "display": "Existing page text can't be edited or removed; only form field text changes.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, pdf-lib",
      "display": "Needs unencrypted input PDFs",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, pdf-lib",
      "display": "Encrypted PDFs must be decrypted before loading and modifying them.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "limitations lead, pdf-lib",
      "display": "Custom fonts need fontkit",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "limitations, pdf-lib",
      "display": "Install and register @pdf-lib/fontkit before embedding custom fonts.",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Quickstart, pdf-lib",
      "display": "import { PDFDocument, StandardFonts, rgb } from 'pdf-lib'\n\n// Create a new PDFDocument\nconst pdfDoc = await PDFDocument.create()\n\n// Embed the Times Roman font\nconst timesRomanFont = await pdfDoc.embedFont(StandardFonts.TimesRoman)\n\n// Add a blank page to the document\nconst page = pdfDoc.addPage()\n\n// Get the width and height of the page\nconst { width, height } = page.getSize()\n\n// Draw a string of text toward the top of the page\nconst fontSize = 30\npage.drawText('Creating PDFs in JavaScript is awesome!', {\n  x: 50,\n  y: height - 4 * fontSize,\n  size: fontSize,\n  font: timesRomanFont,\n  color: rgb(0, 0.53, 0.71),\n})\n\n// Serialize the PDFDocument to bytes (a Uint8Array)\nconst pdfBytes = await pdfDoc.save()\n\n// For example, `pdfBytes` can be:\n//   • Written to a file in Node\n//   • Downloaded from the browser\n//   • Rendered in an <iframe>\n",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project function, pdf-lib",
      "display": "async function extractPages() {\n  const pagesInput = document.getElementById(\n    'pages-to-extract'\n  ) as HTMLInputElement;\n  if (!pagesInput || !pagesInput.value.trim()) {\n    showAlert('No Pages', 'Please enter page numbers to extract.');\n    return;\n  }\n\n  const pagesToExtract = parsePageRanges(\n    pagesInput.value,\n    extractState.totalPages\n  ).map((i) => i + 1);\n  if (pagesToExtract.length === 0) {\n    showAlert('Invalid Pages', 'No valid page numbers found.');\n    return;\n  }\n\n  showLoader('Extracting pages...');\n\n  try {\n    const zip = new JSZip();\n    const baseName = extractState.file?.name.replace('.pdf', '') || 'document';\n\n    for (const pageNum of pagesToExtract) {\n      const newPdf = await PDFDocument.create();\n      const [copiedPage] = await newPdf.copyPages(extractState.pdfDoc, [\n        pageNum - 1,\n      ]);\n      newPdf.addPage(copiedPage);\n      const pdfBytes = await newPdf.save();\n      zip.file(`${baseName}_page_${pageNum}.pdf`, pdfBytes);\n    }\n\n    const zipBlob = await zip.generateAsync({ type: 'blob' });\n    downloadFile(zipBlob, `${baseName}_extracted_pages.zip`);\n\n    hideLoader();\n    showAlert(\n      'Success',\n      trText('Extracted {{length}} page(s) successfully!', {\n        length: pagesToExtract.length,\n      }),\n      'success',\n      () => {\n        resetState();\n      }\n    );\n  } catch (error) {\n    console.error('Error extracting pages:', error);\n    hideLoader();\n    showAlert('Error', 'Failed to extract pages.');\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project function reference, pdf-lib",
      "display": "extract-pages-page.ts · extractPages()",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project repository, pdf-lib",
      "display": "alam00000/bentopdf",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Project stars, alam00000/bentopdf",
      "display": "16.4K",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Project push date, alam00000/bentopdf",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F29": {
      "label": "Library name, jspdf",
      "display": "jsPDF",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Monthly downloads, jspdf",
      "display": "76.2M",
      "asOf": "2026-11-10"
    },
    "F31": {
      "label": "License, jspdf",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Package release, jspdf",
      "display": "4.2.1, Mar 2026",
      "asOf": "2026-03-17"
    },
    "F33": {
      "label": "Package release date, jspdf",
      "display": "Mar 2026",
      "asOf": "2026-03-17"
    },
    "F34": {
      "label": "Repository stars, jspdf",
      "display": "31.3K",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Read existing PDFs, jspdf",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Fillable forms, jspdf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "HTML input, jspdf",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "Tables, jspdf",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "Output formats, jspdf",
      "display": "PDF",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "Install, jspdf",
      "display": "npm install jspdf",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "What it does, jspdf",
      "display": "jsPDF generates PDF documents from drawing commands in the browser or Node.js. new jsPDF() starts a portrait page measured in millimeters, doc.text places a string at a position, and doc.save writes the file, as a download in the browser and to disk in Node.js. Options set the paper size, orientation, and unit. The html method converts an HTML element into PDF content, and a bundled table API turns rows of data into a table.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths lead, jspdf",
      "display": "Creates tables without extras",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "strengths, jspdf",
      "display": "Use the bundled table API to turn structured data into a table.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "strengths lead, jspdf",
      "display": "Downloads generated PDFs",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "strengths, jspdf",
      "display": "Use save() to download a generated PDF in the browser.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations lead, jspdf",
      "display": "Cannot parse existing PDFs",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "limitations, jspdf",
      "display": "Generate new documents; use another library to modify an existing PDF.",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "limitations lead, jspdf",
      "display": "HTML conversion needs extra packages",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "limitations, jspdf",
      "display": "HTML conversion requires html2canvas, plus DOMPurify when passing an HTML string.",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "limitations lead, jspdf",
      "display": "Unicode needs a custom font",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "limitations, jspdf",
      "display": "Characters outside the standard fonts need an embedded TrueType font.",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Quickstart, jspdf",
      "display": "import { jsPDF } from \"jspdf\";\n\n// Default export is a4 paper, portrait, using millimeters for units\nconst doc = new jsPDF();\n\ndoc.text(\"Hello world!\", 10, 10);\ndoc.save(\"a4.pdf\");\n",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Project function, jspdf",
      "display": "() => {\n              const canvas = document.getElementById(\"canvas\");\n              const filename = `${title}_${new Date().toISOString()}`;\n              toJpeg(canvas).then(function (dataUrl) {\n                const doc = new jsPDF(\"l\", \"px\", [\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                ]);\n                doc.addImage(\n                  dataUrl,\n                  \"jpeg\",\n                  0,\n                  0,\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                );\n                doc.save(`${filename}.pdf`);\n              });\n            }\n",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Project function reference, jspdf",
      "display": "ControlPanel.jsx · PDF export callback()",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Project repository, jspdf",
      "display": "drawdb-io/drawdb",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Project stars, drawdb-io/drawdb",
      "display": "40.3K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Project push date, drawdb-io/drawdb",
      "display": "Nov 2026",
      "asOf": "2026-11-12"
    },
    "F58": {
      "label": "Library name, pdfkit",
      "display": "PDFKit",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Monthly downloads, pdfkit",
      "display": "56.9M",
      "asOf": "2026-11-10"
    },
    "F60": {
      "label": "License, pdfkit",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Package release, pdfkit",
      "display": "0.20.2, Aug 2026",
      "asOf": "2026-08-30"
    },
    "F62": {
      "label": "Package release date, pdfkit",
      "display": "Aug 2026",
      "asOf": "2026-08-30"
    },
    "F63": {
      "label": "Repository stars, pdfkit",
      "display": "10.7K",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "Fillable forms, pdfkit",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "Tables, pdfkit",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "Output formats, pdfkit",
      "display": "PDF",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "Install, pdfkit",
      "display": "npm install pdfkit",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "What it does, pdfkit",
      "display": "PDFKit generates multi-page PDFs in Node.js and the browser through a chainable API. A PDFDocument streams its output, so a file or an HTTP response receives the PDF as it is written. Drawing calls follow the HTML canvas API, and text wraps across lines with alignment and bulleted lists. Fonts embed with subsetting from TrueType, OpenType, and WOFF files. Documents can also carry tables, annotations, form fields, outlines, encryption, and the tagged structure that accessible PDFs use.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "strengths lead, pdfkit",
      "display": "Streams generated documents",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "strengths, pdfkit",
      "display": "Pipe PDF output to a file or HTTP response as it is written.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "strengths lead, pdfkit",
      "display": "Includes table generation",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "strengths, pdfkit",
      "display": "Add tables with native methods for rows, columns, and display options.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "strengths lead, pdfkit",
      "display": "Creates interactive PDF forms",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "strengths, pdfkit",
      "display": "Add text fields, selection controls, buttons, and form actions.",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "limitations lead, pdfkit",
      "display": "Browser builds need font registration",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "limitations, pdfkit",
      "display": "Register standard font metrics before creating a browser document with default Helvetica.",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "limitations lead, pdfkit",
      "display": "Browser file paths need registration",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "limitations, pdfkit",
      "display": "Load font and image bytes before using paths in the browser.",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Quickstart, pdfkit",
      "display": "const { PDFDocument } = require('pdfkit');\nconst fs = require('fs');\n\n// Create a document\nconst doc = new PDFDocument();\n\n// Pipe its output somewhere, like to a file or HTTP response\n// See below for browser usage\ndoc.pipe(fs.createWriteStream('output.pdf'));\n\n// Embed a font, set the font size, and render some text\ndoc\n  .font('fonts/PalatinoBold.ttf')\n  .fontSize(25)\n  .text('Some text with an embedded font!', 100, 100);\n\n// Add an image, constrain it to a given size, and center it vertically and horizontally\ndoc.image('path/to/image.png', {\n  fit: [250, 300],\n  align: 'center',\n  valign: 'center'\n});\n\n// Add another page\ndoc\n  .addPage()\n  .fontSize(25)\n  .text('Here is some vector graphics...', 100, 100);\n\n// Draw a triangle\ndoc\n  .save()\n  .moveTo(100, 150)\n  .lineTo(100, 250)\n  .lineTo(200, 250)\n  .fill('#FF3300');\n\n// Apply some transforms and render an SVG path with the 'even-odd' fill rule\ndoc\n  .scale(0.6)\n  .translate(470, -380)\n  .path('M 250,75 L 323,301 131,161 369,161 177,301 z')\n  .fill('red', 'even-odd')\n  .restore();\n\n// Add some text with annotations\ndoc\n  .addPage()\n  .fillColor('blue')\n  .text('Here is a link!', 100, 100)\n  .underline(100, 100, 160, 27, { color: '#0000FF' })\n  .link(100, 100, 160, 27, 'http://google.com/');\n\n// Finalize PDF file\ndoc.end();\n",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Library name, pdfmake",
      "display": "pdfmake",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Monthly downloads, pdfmake",
      "display": "15.2M",
      "asOf": "2026-11-10"
    },
    "F82": {
      "label": "License, pdfmake",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Package release, pdfmake",
      "display": "0.3.14, Nov 2026",
      "asOf": "2026-11-08"
    },
    "F84": {
      "label": "Package release date, pdfmake",
      "display": "Nov 2026",
      "asOf": "2026-11-08"
    },
    "F85": {
      "label": "Repository stars, pdfmake",
      "display": "12.4K",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Fillable forms, pdfmake",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "HTML input, pdfmake",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Tables, pdfmake",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Output formats, pdfmake",
      "display": "PDF",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Install, pdfmake",
      "display": "npm install pdfmake",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "What it does, pdfmake",
      "display": "pdfmake builds PDFs from a document definition, a JavaScript object that lists content and styles, in Node.js and browsers. The library works out the layout: line wrapping, lists, columns, and tables with column and row spans and header rows that repeat after a page break. Definitions also set page headers and footers, a table of contents, watermarks, and QR codes. createPdf turns a definition into a file that downloads, opens, or prints in the browser.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths lead, pdfmake",
      "display": "Uses declarative page layouts",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths, pdfmake",
      "display": "Describe paragraphs, tables, and styles instead of calculating text coordinates.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "strengths lead, pdfmake",
      "display": "Handles merged table cells",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "strengths, pdfmake",
      "display": "Build tables with headers, borders and cells spanning rows or columns.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations lead, pdfmake",
      "display": "Fillable forms remain unsupported",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations, pdfmake",
      "display": "Use another library when the PDF needs interactive form fields.",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "limitations lead, pdfmake",
      "display": "HTML needs a separate converter",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "limitations, pdfmake",
      "display": "Convert HTML into document definitions with a separate adapter.",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Quickstart, pdfmake",
      "display": "import pdfMake from \"pdfmake/build/pdfmake\";\nimport \"pdfmake/build/vfs_fonts\";\n\n\nvar docDefinition = { content: 'This is an sample PDF printed with pdfMake' };\n\n\npdfMake.createPdf(docDefinition).download('file.pdf');\n",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project function, pdfmake",
      "display": "function (e, dt, button, config, cb) {\n\t\tvar data = dt.buttons.exportData(config.exportOptions);\n\t\tvar info = dt.buttons.exportInfo(config as any); // Need better typing\n\t\tvar rows = [];\n\n\t\tif (config.header) {\n\t\t\tdata.headerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableHeader'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tfor (var i = 0, ien = data.body.length; i < ien; i++) {\n\t\t\trows.push(\n\t\t\t\tdata.body[i].map(function (d) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\td === null || d === undefined\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: typeof d === 'string'\n\t\t\t\t\t\t\t\t? d\n\t\t\t\t\t\t\t\t: (d as any).toString()\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\n\t\tif (config.footer) {\n\t\t\tdata.footerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableFooter'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tvar doc: any = {\n\t\t\tpageSize: config.pageSize,\n\t\t\tpageOrientation: config.orientation,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\tstyle: 'table',\n\t\t\t\t\ttable: {\n\t\t\t\t\t\theaderRows: config.header\n\t\t\t\t\t\t\t? data.headerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tfooterRows: config.footer // Used for styling, doesn't do anything in pdfmake\n\t\t\t\t\t\t\t? data.footerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tbody: rows\n\t\t\t\t\t},\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\thLineWidth: function (i: number, node: any) {\n\t\t\t\t\t\t\tif (i === 0 || i === node.table.body.length) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 0.5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvLineWidth: function () {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t},\n\t\t\t\t\t\thLineColor: function (i: number, node: any) {\n\t\t\t\t\t\t\treturn i === node.table.headerRows ||\n\t\t\t\t\t\t\t\ti ===\n\t\t\t\t\t\t\t\t\tnode.table.body.length -\n\t\t\t\t\t\t\t\t\t\tnode.table.footerRows\n\t\t\t\t\t\t\t\t? '#333'\n\t\t\t\t\t\t\t\t: '#ddd';\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfillColor: function (rowIndex: number) {\n\t\t\t\t\t\t\tif (rowIndex < data.headerStructure.length) {\n\t\t\t\t\t\t\t\treturn '#fff';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn rowIndex % 2 === 0 ? '#f3f3f3' : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingTop: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingBottom: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\ttableHeader: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttableFooter: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttable: {\n\t\t\t\t\tmargin: [0, 5, 0, 5]\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\talignment: 'center',\n\t\t\t\t\tfontSize: 13\n\t\t\t\t},\n\t\t\t\tmessage: {}\n\t\t\t},\n\t\t\tdefaultStyle: {\n\t\t\t\tfontSize: 10\n\t\t\t}\n\t\t};\n\n\t\tif (info.messageTop) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.messageTop,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.messageBottom) {\n\t\t\tdoc.content.push({\n\t\t\t\ttext: info.messageBottom,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.title) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.title,\n\t\t\t\tstyle: 'title',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (config.customize) {\n\t\t\tconfig.customize(doc, config, dt);\n\t\t}\n\n\t\tvar pdf = DataTable.Buttons.pdfMake().createPdf(doc);\n\n\t\tif (config.download === 'open') {\n\t\t\tpdf.open();\n\t\t}\n\t\telse {\n\t\t\tpdf.download(info.filename);\n\t\t}\n\n\t\tcb();\n\t}\n",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Project function reference, pdfmake",
      "display": "pdf.ts · PDF table export action()",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Project repository, pdfmake",
      "display": "DataTables/Buttons",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Project stars, DataTables/Buttons",
      "display": "138",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Project push date, DataTables/Buttons",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F106": {
      "label": "Developer need",
      "display": "Modify existing PDFs",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose pdf-lib",
      "display": "existing documents",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "modify existing PDFs",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need",
      "display": "Browser downloads",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Why choose jspdf",
      "display": "save method",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need in introduction",
      "display": "browser downloads",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need",
      "display": "Declarative layouts",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Why choose pdfmake",
      "display": "document definition",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Developer need in introduction",
      "display": "declarative layouts",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Developer need",
      "display": "Stream PDF output",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Why choose pdfkit",
      "display": "Node streams",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "Developer need in introduction",
      "display": "stream PDF output",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "Page introduction",
      "display": "JavaScript PDF libraries let application developers create or read PDF documents.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Library name, pdf-lib",
      "display": "pdf-lib",
      "asOf": "2026-11-19"
    },
    "F120": {
      "label": "Monthly downloads, pdf-lib",
      "display": "118.0M",
      "asOf": "2026-11-19"
    },
    "F121": {
      "label": "License, pdf-lib",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F122": {
      "label": "Package release, pdf-lib",
      "display": "1.17.1",
      "asOf": "2026-11-19"
    },
    "F123": {
      "label": "Package release date, pdf-lib",
      "display": "Nov 2021",
      "asOf": "2026-11-19"
    },
    "F124": {
      "label": "Install, pdf-lib",
      "display": "npm install --save pdf-lib",
      "asOf": "2026-11-19"
    },
    "F125": {
      "label": "Quickstart, pdf-lib",
      "display": "import {PDFDocument} from 'pdf-lib'\n\nconst pdfDoc = await PDFDocument.create()\nconst page = pdfDoc.addPage()\npage.drawText('Hello world!', {x: 50, y: 700, size: 20})\nconst pdfBytes = await pdfDoc.save()\n",
      "asOf": "2026-11-19"
    },
    "F126": {
      "label": "Repository stars, pdf-lib",
      "display": "8.7K",
      "asOf": "2026-11-19"
    },
    "F127": {
      "label": "Node.js generation, pdf-lib",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F128": {
      "label": "Password encryption, pdf-lib",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F129": {
      "label": "Primary workflow, pdf-lib",
      "display": "Create and modify existing PDF documents; fonts/pages/form fields.",
      "asOf": "2026-11-19"
    },
    "F130": {
      "label": "Project function, pdf-lib",
      "display": "async function extractPages() {\n  const pagesInput = document.getElementById(\n    'pages-to-extract'\n  ) as HTMLInputElement;\n  if (!pagesInput || !pagesInput.value.trim()) {\n    showAlert('No Pages', 'Please enter page numbers to extract.');\n    return;\n  }\n\n  const pagesToExtract = parsePageRanges(\n    pagesInput.value,\n    extractState.totalPages\n  ).map((i) => i + 1);\n  if (pagesToExtract.length === 0) {\n    showAlert('Invalid Pages', 'No valid page numbers found.');\n    return;\n  }\n\n  showLoader('Extracting pages...');\n\n  try {\n    const zip = new JSZip();\n    const baseName = extractState.file?.name.replace('.pdf', '') || 'document';\n\n    for (const pageNum of pagesToExtract) {\n      const newPdf = await PDFDocument.create();\n      const [copiedPage] = await newPdf.copyPages(extractState.pdfDoc, [\n        pageNum - 1,\n      ]);\n      newPdf.addPage(copiedPage);\n      const pdfBytes = await newPdf.save();\n      zip.file(`${baseName}_page_${pageNum}.pdf`, pdfBytes);\n    }\n\n    const zipBlob = await zip.generateAsync({ type: 'blob' });\n    downloadFile(zipBlob, `${baseName}_extracted_pages.zip`);\n\n    hideLoader();\n    showAlert(\n      'Success',\n      trText('Extracted {{length}} page(s) successfully!', {\n        length: pagesToExtract.length,\n      }),\n      'success',\n      () => {\n        resetState();\n      }\n    );\n  } catch (error) {\n    console.error('Error extracting pages:', error);\n    hideLoader();\n    showAlert('Error', 'Failed to extract pages.');\n  }\n}\n",
      "asOf": "2026-11-19"
    },
    "F131": {
      "label": "Project source file, pdf-lib",
      "display": "src/js/logic/extract-pages-page.ts",
      "asOf": "2026-11-19"
    },
    "F132": {
      "label": "Project full_name, pdf-lib",
      "display": "alam00000/bentopdf",
      "asOf": "2026-11-19"
    },
    "F133": {
      "label": "Project stargazers_count, pdf-lib",
      "display": "16.4K",
      "asOf": "2026-11-19"
    },
    "F134": {
      "label": "Library name, jspdf",
      "display": "jsPDF",
      "asOf": "2026-11-19"
    },
    "F135": {
      "label": "Monthly downloads, jspdf",
      "display": "83.5M",
      "asOf": "2026-11-19"
    },
    "F136": {
      "label": "License, jspdf",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F137": {
      "label": "Package release, jspdf",
      "display": "4.2.1",
      "asOf": "2026-11-19"
    },
    "F138": {
      "label": "Package release date, jspdf",
      "display": "Mar 2026",
      "asOf": "2026-11-19"
    },
    "F139": {
      "label": "Install, jspdf",
      "display": "npm install jspdf",
      "asOf": "2026-11-19"
    },
    "F140": {
      "label": "Quickstart, jspdf",
      "display": "import { jsPDF } from \"jspdf\";\n\n// Default export is a4 paper, portrait, using millimeters for units\nconst doc = new jsPDF();\n\ndoc.text(\"Hello world!\", 10, 10);\ndoc.save(\"a4.pdf\");\n",
      "asOf": "2026-11-19"
    },
    "F141": {
      "label": "Repository stars, jspdf",
      "display": "31.3K",
      "asOf": "2026-11-19"
    },
    "F142": {
      "label": "Node.js generation, jspdf",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F143": {
      "label": "Password encryption, jspdf",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F144": {
      "label": "Primary workflow, jspdf",
      "display": "Programmatic browser/Node generation from text, images, and drawing APIs.",
      "asOf": "2026-11-19"
    },
    "F145": {
      "label": "Project function, jspdf",
      "display": "() => {\n              const canvas = document.getElementById(\"canvas\");\n              const filename = `${title}_${new Date().toISOString()}`;\n              toJpeg(canvas).then(function (dataUrl) {\n                const doc = new jsPDF(\"l\", \"px\", [\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                ]);\n                doc.addImage(\n                  dataUrl,\n                  \"jpeg\",\n                  0,\n                  0,\n                  canvas.offsetWidth,\n                  canvas.offsetHeight,\n                );\n                doc.save(`${filename}.pdf`);\n              });\n            }\n",
      "asOf": "2026-11-19"
    },
    "F146": {
      "label": "Project source file, jspdf",
      "display": "src/components/EditorHeader/ControlPanel.jsx",
      "asOf": "2026-11-19"
    },
    "F147": {
      "label": "Project full_name, jspdf",
      "display": "drawdb-io/drawdb",
      "asOf": "2026-11-19"
    },
    "F148": {
      "label": "Project stargazers_count, jspdf",
      "display": "40.3K",
      "asOf": "2026-11-19"
    },
    "F149": {
      "label": "Library name, pdfkit",
      "display": "PDFKit",
      "asOf": "2026-11-19"
    },
    "F150": {
      "label": "Monthly downloads, pdfkit",
      "display": "64.5M",
      "asOf": "2026-11-19"
    },
    "F151": {
      "label": "License, pdfkit",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F152": {
      "label": "Package release, pdfkit",
      "display": "0.20.2",
      "asOf": "2026-11-19"
    },
    "F153": {
      "label": "Package release date, pdfkit",
      "display": "Aug 2026",
      "asOf": "2026-11-19"
    },
    "F154": {
      "label": "Install, pdfkit",
      "display": "npm install pdfkit",
      "asOf": "2026-11-19"
    },
    "F155": {
      "label": "Quickstart, pdfkit",
      "display": "const PDFDocument = require('pdfkit');\nconst fs = require('fs');\nconst doc = new PDFDocument();\ndoc.pipe(fs.createWriteStream('output.pdf'));\ndoc.text('Hello world!');\ndoc.end();\n",
      "asOf": "2026-11-19"
    },
    "F156": {
      "label": "Repository stars, pdfkit",
      "display": "10.7K",
      "asOf": "2026-11-19"
    },
    "F157": {
      "label": "Node.js generation, pdfkit",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F158": {
      "label": "Password encryption, pdfkit",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F159": {
      "label": "Primary workflow, pdfkit",
      "display": "Streaming document generation with text layout, vector drawing, and forms.",
      "asOf": "2026-11-19"
    },
    "F160": {
      "label": "Project function, pdfkit",
      "display": "addBackground(\n      { x, y, width, height }: Rect,\n      fillColor?: string,\n      fillOpacity?: number,\n      callback?: (doc: this) => void,\n    ): void {\n      fillColor ||= \"grey\";\n      fillOpacity ||= 0.1;\n\n      this.save();\n      this.fill(fillColor)\n        .fillOpacity(fillOpacity)\n        .rect(x, y, width, height)\n        .fill();\n      this.restore();\n\n      typeof callback === \"function\" && callback(this);\n    }\n",
      "asOf": "2026-11-19"
    },
    "F161": {
      "label": "Project source file, pdfkit",
      "display": "src/document.ts",
      "asOf": "2026-11-19"
    },
    "F162": {
      "label": "Project full_name, pdfkit",
      "display": "natancabral/pdfkit-table",
      "asOf": "2026-11-19"
    },
    "F163": {
      "label": "Project stargazers_count, pdfkit",
      "display": "102",
      "asOf": "2026-11-19"
    },
    "F164": {
      "label": "Library name, @react-pdf/renderer",
      "display": "@react-pdf/renderer",
      "asOf": "2026-11-19"
    },
    "F165": {
      "label": "Monthly downloads, @react-pdf/renderer",
      "display": "36.3M",
      "asOf": "2026-11-19"
    },
    "F166": {
      "label": "License, @react-pdf/renderer",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F167": {
      "label": "Package release, @react-pdf/renderer",
      "display": "4.9.0",
      "asOf": "2026-11-19"
    },
    "F168": {
      "label": "Package release date, @react-pdf/renderer",
      "display": "Aug 2026",
      "asOf": "2026-11-19"
    },
    "F169": {
      "label": "Install, @react-pdf/renderer",
      "display": "yarn add @react-pdf/renderer",
      "asOf": "2026-11-19"
    },
    "F170": {
      "label": "Quickstart, @react-pdf/renderer",
      "display": "import React from 'react';\nimport ReactPDF, {Document, Page, Text} from '@react-pdf/renderer';\n\nconst MyDocument = () => (\n  <Document><Page size=\"A4\"><Text>Hello world!</Text></Page></Document>\n);\nReactPDF.render(<MyDocument />, './example.pdf');\n",
      "asOf": "2026-11-19"
    },
    "F171": {
      "label": "Official description, @react-pdf/renderer",
      "display": "@react-pdf/renderer builds PDFs from React components, in the browser and on the server. A document is written with Document, Page, View, and Text components and styled through StyleSheet.create with CSS-like properties such as flex direction and margin. In the browser, PDFViewer shows the result in the page. On the server, ReactPDF.render writes it to a file. The package only creates PDFs, and the separate react-pdf package displays existing ones.",
      "asOf": "2026-11-19"
    },
    "F172": {
      "label": "Quickstart source file, @react-pdf/renderer",
      "display": "README.md",
      "asOf": "2026-11-19"
    },
    "F173": {
      "label": "Repository stars, @react-pdf/renderer",
      "display": "16.9K",
      "asOf": "2026-11-19"
    },
    "F174": {
      "label": "Node.js generation, @react-pdf/renderer",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F175": {
      "label": "Password encryption, @react-pdf/renderer",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F176": {
      "label": "Primary workflow, @react-pdf/renderer",
      "display": "React primitives define a separate PDF document tree, not a capture of an existing DOM page.",
      "asOf": "2026-11-19"
    },
    "F177": {
      "label": "Project function, @react-pdf/renderer",
      "display": "export const ResumePDF = ({\n  resume,\n  settings,\n  isPDF = false,\n}: {\n  resume: Resume;\n  settings: Settings;\n  isPDF?: boolean;\n}) => {\n  const { profile, workExperiences, educations, projects, skills, custom } =\n    resume;\n  const { name } = profile;\n  const {\n    fontFamily,\n    fontSize,\n    documentSize,\n    formToHeading,\n    formToShow,\n    formsOrder,\n    showBulletPoints,\n  } = settings;\n  const themeColor = settings.themeColor || DEFAULT_FONT_COLOR;\n\n  const showFormsOrder = formsOrder.filter((form) => formToShow[form]);\n\n  const formTypeToComponent: { [type in ShowForm]: () => JSX.Element } = {\n    workExperiences: () => (\n      <ResumePDFWorkExperience\n        heading={formToHeading[\"workExperiences\"]}\n        workExperiences={workExperiences}\n        themeColor={themeColor}\n      />\n    ),\n    educations: () => (\n      <ResumePDFEducation\n        heading={formToHeading[\"educations\"]}\n        educations={educations}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"educations\"]}\n      />\n    ),\n    projects: () => (\n      <ResumePDFProject\n        heading={formToHeading[\"projects\"]}\n        projects={projects}\n        themeColor={themeColor}\n      />\n    ),\n    skills: () => (\n      <ResumePDFSkills\n        heading={formToHeading[\"skills\"]}\n        skills={skills}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"skills\"]}\n      />\n    ),\n    custom: () => (\n      <ResumePDFCustom\n        heading={formToHeading[\"custom\"]}\n        custom={custom}\n        themeColor={themeColor}\n        showBulletPoints={showBulletPoints[\"custom\"]}\n      />\n    ),\n  };\n\n  return (\n    <>\n      <Document title={`${name} Resume`} author={name} producer={\"OpenResume\"}>\n        <Page\n          size={documentSize === \"A4\" ? \"A4\" : \"LETTER\"}\n          style={{\n            ...styles.flexCol,\n            color: DEFAULT_FONT_COLOR,\n            fontFamily,\n            fontSize: fontSize + \"pt\",\n          }}\n        >\n          {Boolean(settings.themeColor) && (\n            <View\n              style={{\n                width: spacing[\"full\"],\n                height: spacing[3.5],\n                backgroundColor: themeColor,\n              }}\n            />\n          )}\n          <View\n            style={{\n              ...styles.flexCol,\n              padding: `${spacing[0]} ${spacing[20]}`,\n            }}\n          >\n            <ResumePDFProfile\n              profile={profile}\n              themeColor={themeColor}\n              isPDF={isPDF}\n            />\n            {showFormsOrder.map((form) => {\n              const Component = formTypeToComponent[form];\n              return <Component key={form} />;\n            })}\n          </View>\n        </Page>\n      </Document>\n      <SuppressResumePDFErrorMessage />\n    </>\n  );\n};\n",
      "asOf": "2026-11-19"
    },
    "F178": {
      "label": "Project source file, @react-pdf/renderer",
      "display": "src/app/components/Resume/ResumePDF/index.tsx",
      "asOf": "2026-11-19"
    },
    "F179": {
      "label": "Project full_name, @react-pdf/renderer",
      "display": "xitanggg/open-resume",
      "asOf": "2026-11-19"
    },
    "F180": {
      "label": "Project stargazers_count, @react-pdf/renderer",
      "display": "9.0K",
      "asOf": "2026-11-19"
    },
    "F181": {
      "label": "Library name, pdfmake",
      "display": "pdfmake",
      "asOf": "2026-11-19"
    },
    "F182": {
      "label": "Monthly downloads, pdfmake",
      "display": "17.0M",
      "asOf": "2026-11-19"
    },
    "F183": {
      "label": "License, pdfmake",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F184": {
      "label": "Package release, pdfmake",
      "display": "0.3.14",
      "asOf": "2026-11-19"
    },
    "F185": {
      "label": "Package release date, pdfmake",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F186": {
      "label": "Install, pdfmake",
      "display": "npm install pdfmake",
      "asOf": "2026-11-19"
    },
    "F187": {
      "label": "Quickstart, pdfmake",
      "display": "import pdfMake from 'pdfmake/build/pdfmake';\nimport pdfFonts from 'pdfmake/build/vfs_fonts';\npdfMake.addVirtualFileSystem(pdfFonts);\npdfMake.createPdf({ content: 'Hello world!' }).download('document.pdf');\n",
      "asOf": "2026-11-19"
    },
    "F188": {
      "label": "Repository stars, pdfmake",
      "display": "12.4K",
      "asOf": "2026-11-19"
    },
    "F189": {
      "label": "Node.js generation, pdfmake",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F190": {
      "label": "Password encryption, pdfmake",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F191": {
      "label": "Primary workflow, pdfmake",
      "display": "Declarative document-definition layout with tables, text, and bundled/custom fonts.",
      "asOf": "2026-11-19"
    },
    "F192": {
      "label": "Project function, pdfmake",
      "display": "function (e, dt, button, config, cb) {\n\t\tvar data = dt.buttons.exportData(config.exportOptions);\n\t\tvar info = dt.buttons.exportInfo(config as any); // Need better typing\n\t\tvar rows = [];\n\n\t\tif (config.header) {\n\t\t\tdata.headerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableHeader'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tfor (var i = 0, ien = data.body.length; i < ien; i++) {\n\t\t\trows.push(\n\t\t\t\tdata.body[i].map(function (d) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttext:\n\t\t\t\t\t\t\td === null || d === undefined\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: typeof d === 'string'\n\t\t\t\t\t\t\t\t? d\n\t\t\t\t\t\t\t\t: (d as any).toString()\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\n\t\tif (config.footer) {\n\t\t\tdata.footerStructure.forEach(function (row) {\n\t\t\t\trows.push(\n\t\t\t\t\trow.map(function (cell) {\n\t\t\t\t\t\treturn cell\n\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\ttext: cell.title,\n\t\t\t\t\t\t\t\t\tcolSpan: cell.colspan,\n\t\t\t\t\t\t\t\t\trowSpan: cell.rowspan,\n\t\t\t\t\t\t\t\t\tstyle: 'tableFooter'\n\t\t\t\t\t\t\t  }\n\t\t\t\t\t\t\t: {};\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tvar doc: any = {\n\t\t\tpageSize: config.pageSize,\n\t\t\tpageOrientation: config.orientation,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\tstyle: 'table',\n\t\t\t\t\ttable: {\n\t\t\t\t\t\theaderRows: config.header\n\t\t\t\t\t\t\t? data.headerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tfooterRows: config.footer // Used for styling, doesn't do anything in pdfmake\n\t\t\t\t\t\t\t? data.footerStructure.length\n\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tbody: rows\n\t\t\t\t\t},\n\t\t\t\t\tlayout: {\n\t\t\t\t\t\thLineWidth: function (i: number, node: any) {\n\t\t\t\t\t\t\tif (i === 0 || i === node.table.body.length) {\n\t\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 0.5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tvLineWidth: function () {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t},\n\t\t\t\t\t\thLineColor: function (i: number, node: any) {\n\t\t\t\t\t\t\treturn i === node.table.headerRows ||\n\t\t\t\t\t\t\t\ti ===\n\t\t\t\t\t\t\t\t\tnode.table.body.length -\n\t\t\t\t\t\t\t\t\t\tnode.table.footerRows\n\t\t\t\t\t\t\t\t? '#333'\n\t\t\t\t\t\t\t\t: '#ddd';\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfillColor: function (rowIndex: number) {\n\t\t\t\t\t\t\tif (rowIndex < data.headerStructure.length) {\n\t\t\t\t\t\t\t\treturn '#fff';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn rowIndex % 2 === 0 ? '#f3f3f3' : null;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingTop: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpaddingBottom: function () {\n\t\t\t\t\t\t\treturn 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\ttableHeader: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttableFooter: {\n\t\t\t\t\tbold: true,\n\t\t\t\t\tfontSize: 11,\n\t\t\t\t\talignment: 'center'\n\t\t\t\t},\n\t\t\t\ttable: {\n\t\t\t\t\tmargin: [0, 5, 0, 5]\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\talignment: 'center',\n\t\t\t\t\tfontSize: 13\n\t\t\t\t},\n\t\t\t\tmessage: {}\n\t\t\t},\n\t\t\tdefaultStyle: {\n\t\t\t\tfontSize: 10\n\t\t\t}\n\t\t};\n\n\t\tif (info.messageTop) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.messageTop,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.messageBottom) {\n\t\t\tdoc.content.push({\n\t\t\t\ttext: info.messageBottom,\n\t\t\t\tstyle: 'message',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (info.title) {\n\t\t\tdoc.content.unshift({\n\t\t\t\ttext: info.title,\n\t\t\t\tstyle: 'title',\n\t\t\t\tmargin: [0, 0, 0, 12]\n\t\t\t});\n\t\t}\n\n\t\tif (config.customize) {\n\t\t\tconfig.customize(doc, config, dt);\n\t\t}\n\n\t\tvar pdf = DataTable.Buttons.pdfMake().createPdf(doc);\n\n\t\tif (config.download === 'open') {\n\t\t\tpdf.open();\n\t\t}\n\t\telse {\n\t\t\tpdf.download(info.filename);\n\t\t}\n\n\t\tcb();\n\t}\n",
      "asOf": "2026-11-19"
    },
    "F193": {
      "label": "Project source file, pdfmake",
      "display": "js/buttons/pdf.ts",
      "asOf": "2026-11-19"
    },
    "F194": {
      "label": "Project full_name, pdfmake",
      "display": "DataTables/Buttons",
      "asOf": "2026-11-19"
    },
    "F195": {
      "label": "Project stargazers_count, pdfmake",
      "display": "138",
      "asOf": "2026-11-19"
    },
    "F196": {
      "label": "Library name, @cantoo/pdf-lib",
      "display": "@cantoo/pdf-lib",
      "asOf": "2026-11-19"
    },
    "F197": {
      "label": "Monthly downloads, @cantoo/pdf-lib",
      "display": "13.1M",
      "asOf": "2026-11-19"
    },
    "F198": {
      "label": "License, @cantoo/pdf-lib",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F199": {
      "label": "Package release, @cantoo/pdf-lib",
      "display": "2.11.1",
      "asOf": "2026-11-19"
    },
    "F200": {
      "label": "Package release date, @cantoo/pdf-lib",
      "display": "Sep 2026",
      "asOf": "2026-11-19"
    },
    "F201": {
      "label": "Install, @cantoo/pdf-lib",
      "display": "npm install @cantoo/pdf-lib",
      "asOf": "2026-11-19"
    },
    "F202": {
      "label": "Quickstart, @cantoo/pdf-lib",
      "display": "import { PDFDocument } from '@cantoo/pdf-lib';\nconst doc = await PDFDocument.create();\nconst page = doc.addPage();\npage.drawText('Hello world!', { x: 50, y: 700 });\nconst bytes = await doc.save();\n",
      "asOf": "2026-11-19"
    },
    "F203": {
      "label": "Official description, @cantoo/pdf-lib",
      "display": "@cantoo/pdf-lib is a maintained fork of pdf-lib that keeps the original API and adds features the original lacks. It draws full SVG images rather than only SVG paths, and extractContents pulls text and images out of a page. Incremental updates append changes without rewriting the whole file, which signing workflows depend on. The fork also recovers truncated PDFs that the original rejects.",
      "asOf": "2026-11-19"
    },
    "F204": {
      "label": "Quickstart source file, @cantoo/pdf-lib",
      "display": "README.md",
      "asOf": "2026-11-19"
    },
    "F205": {
      "label": "Repository stars, @cantoo/pdf-lib",
      "display": "361",
      "asOf": "2026-11-19"
    },
    "F206": {
      "label": "Node.js generation, @cantoo/pdf-lib",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F207": {
      "label": "Password encryption, @cantoo/pdf-lib",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F208": {
      "label": "Primary workflow, @cantoo/pdf-lib",
      "display": "Maintained fork with encryption and incremental-update APIs distinct from upstream.",
      "asOf": "2026-11-19"
    },
    "F209": {
      "label": "Encryption prerequisite, @cantoo/pdf-lib",
      "display": "encrypt() requires Web Crypto; AES256 revision6 is the default.",
      "asOf": "2026-11-19"
    },
    "F210": {
      "label": "Project function, @cantoo/pdf-lib",
      "display": "function makeQuadPoints(\n  context: PDFDocument[\"context\"],\n  rects: Rect[],\n): PDFArray {\n  const arr = PDFArray.withContext(context);\n  for (const r of rects) {\n    const x1 = r.x;\n    const y1 = r.y;\n    const x2 = r.x + r.width;\n    const y2 = r.y + r.height;\n    // QuadPoints order: top-left, top-right, bottom-left, bottom-right\n    arr.push(PDFNumber.of(x1));\n    arr.push(PDFNumber.of(y2)); // top-left\n    arr.push(PDFNumber.of(x2));\n    arr.push(PDFNumber.of(y2)); // top-right\n    arr.push(PDFNumber.of(x1));\n    arr.push(PDFNumber.of(y1)); // bottom-left\n    arr.push(PDFNumber.of(x2));\n    arr.push(PDFNumber.of(y1)); // bottom-right\n  }\n  return arr;\n}\n",
      "asOf": "2026-11-19"
    },
    "F211": {
      "label": "Project source file, @cantoo/pdf-lib",
      "display": "examples/pdf-server/src/pdf-annotations.ts",
      "asOf": "2026-11-19"
    },
    "F212": {
      "label": "Project full_name, @cantoo/pdf-lib",
      "display": "modelcontextprotocol/ext-apps",
      "asOf": "2026-11-19"
    },
    "F213": {
      "label": "Project stargazers_count, @cantoo/pdf-lib",
      "display": "3.1K",
      "asOf": "2026-11-19"
    },
    "F214": {
      "label": "Library name, html2pdf.js",
      "display": "html2pdf.js",
      "asOf": "2026-11-19"
    },
    "F215": {
      "label": "Monthly downloads, html2pdf.js",
      "display": "6.3M",
      "asOf": "2026-11-19"
    },
    "F216": {
      "label": "License, html2pdf.js",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F217": {
      "label": "Package release, html2pdf.js",
      "display": "0.14.0",
      "asOf": "2026-11-19"
    },
    "F218": {
      "label": "Package release date, html2pdf.js",
      "display": "Jan 2026",
      "asOf": "2026-11-19"
    },
    "F219": {
      "label": "Install, html2pdf.js",
      "display": "npm install html2pdf.js",
      "asOf": "2026-11-19"
    },
    "F220": {
      "label": "Quickstart, html2pdf.js",
      "display": "import html2pdf from 'html2pdf.js';\nconst element = document.getElementById('element-to-print');\nhtml2pdf(element);\n",
      "asOf": "2026-11-19"
    },
    "F221": {
      "label": "Official description, html2pdf.js",
      "display": "html2pdf.js converts a web page or a single element into a PDF entirely in the browser. It draws the element onto a canvas with html2canvas and places the resulting image into a document with jsPDF. One chained call takes the element and saves the file, and options set margins, page size, image quality, and page breaks. Text in the output is part of the image.",
      "asOf": "2026-11-19"
    },
    "F222": {
      "label": "Quickstart source file, html2pdf.js",
      "display": "README.md",
      "asOf": "2026-11-19"
    },
    "F223": {
      "label": "Repository stars, html2pdf.js",
      "display": "4.9K",
      "asOf": "2026-11-19"
    },
    "F224": {
      "label": "Node.js generation, html2pdf.js",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F225": {
      "label": "Password encryption, html2pdf.js",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F226": {
      "label": "Primary workflow, html2pdf.js",
      "display": "Browser HTML rasterization through html2canvas and jsPDF.",
      "asOf": "2026-11-19"
    },
    "F227": {
      "label": "Rendered text, html2pdf.js",
      "display": "Raster image output; text is not selectable or searchable.",
      "asOf": "2026-11-19"
    },
    "F228": {
      "label": "Project function, html2pdf.js",
      "display": "async downloadPdf () {\n\t\t\t// Set Element and Html2pdf.js Options\n\t\t\tconst pdfContent = this.$refs.pdfContent\n\t\t\tlet options = this.setOptions()\n\n\t\t\tthis.$emit('beforeDownload', { html2pdf, options, pdfContent })\n\n\t\t\tconst html2PdfSetup = html2pdf().set(options).from(pdfContent)\n\t\t\tlet pdfBlobUrl = null\n\n\t\t\tif (this.previewModal) {\n\t\t\t\tthis.pdfFile = await html2PdfSetup.output('bloburl')\n\t\t\t\tpdfBlobUrl = this.pdfFile\n\t\t\t}\n\n\t\t\tif (this.enableDownload) {\n\t\t\t\tpdfBlobUrl = await html2PdfSetup.save().output('bloburl')\n\t\t\t}\n\n\t\t\tif (pdfBlobUrl) {\n\t\t\t\tconst res = await fetch(pdfBlobUrl)\n\t\t\t\tconst blobFile = await res.blob()\n\t\t\t\tthis.$emit('hasDownloaded', blobFile)\n\t\t\t}\n\n\t\t\tthis.progress = 100\n\t\t}\n",
      "asOf": "2026-11-19"
    },
    "F229": {
      "label": "Project source file, html2pdf.js",
      "display": "src/vue-html2pdf.vue",
      "asOf": "2026-11-19"
    },
    "F230": {
      "label": "Project full_name, html2pdf.js",
      "display": "kempsteven/vue-html2pdf",
      "asOf": "2026-11-19"
    },
    "F231": {
      "label": "Project stargazers_count, html2pdf.js",
      "display": "452",
      "asOf": "2026-11-19"
    },
    "F232": {
      "label": "Library name, @libpdf/core",
      "display": "LibPDF",
      "asOf": "2026-11-19"
    },
    "F233": {
      "label": "Monthly downloads, @libpdf/core",
      "display": "1.2M",
      "asOf": "2026-11-19"
    },
    "F234": {
      "label": "License, @libpdf/core",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F235": {
      "label": "Package release, @libpdf/core",
      "display": "0.5.3",
      "asOf": "2026-11-19"
    },
    "F236": {
      "label": "Package release date, @libpdf/core",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F237": {
      "label": "Install, @libpdf/core",
      "display": "npm install @libpdf/core",
      "asOf": "2026-11-19"
    },
    "F238": {
      "label": "Quickstart, @libpdf/core",
      "display": "import { PDF } from \"@libpdf/core\";\n\nconst pdf = await PDF.load(bytes);\nconst pages = pdf.getPages();\n\nconsole.log(`${pages.length} pages`);\n",
      "asOf": "2026-11-19"
    },
    "F239": {
      "label": "Official description, @libpdf/core",
      "display": "LibPDF is a TypeScript library that parses, modifies, and generates PDFs, with a parser that falls back gracefully on malformed files. It fills and flattens forms, merges and splits documents, extracts text with positions, and embeds fonts with subsetting. Encryption, digital signatures, and incremental saves that keep existing signatures valid are built in. Documenso, the company that wrote it, runs it in production, and the project labels itself beta software.",
      "asOf": "2026-11-19"
    },
    "F240": {
      "label": "Quickstart source file, @libpdf/core",
      "display": "README.md",
      "asOf": "2026-11-19"
    },
    "F241": {
      "label": "Repository stars, @libpdf/core",
      "display": "1.9K",
      "asOf": "2026-11-19"
    },
    "F242": {
      "label": "Node.js generation, @libpdf/core",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F243": {
      "label": "Password encryption, @libpdf/core",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F244": {
      "label": "Primary workflow, @libpdf/core",
      "display": "PDF parsing/generation, forms, digital signatures, and incremental saving.",
      "asOf": "2026-11-19"
    },
    "F245": {
      "label": "Signature scope, @libpdf/core",
      "display": "{\"signing\": \"Supported PAdES B-B/B-T/B-LT/B-LTA\", \"verification\": \"Not implemented\", \"certificate_encryption\": \"Not supported\"}",
      "asOf": "2026-11-19"
    },
    "F246": {
      "label": "Project function, @libpdf/core",
      "display": "export async function buildWatermarkedPdf({\n  fileBytes,\n  fileType,\n  watermarkConfig,\n  viewerData,\n  flatten = false,\n  onProgress,\n}: BuildWatermarkedPdfOptions): Promise<Uint8Array> {\n  let pdf: PDF;\n  let pages: PDFPage[];\n\n  if (fileType === \"image\") {\n    pdf = PDF.create();\n    let image;\n    try {\n      image = pdf.embedImage(fileBytes);\n    } catch (error) {\n      throw new Error(\n        `Unsupported image format for watermarking: ${\n          error instanceof Error ? error.message : String(error)\n        }`,\n      );\n    }\n    // Scale large images down so the watermark font-size cap (1000pt) doesn't\n    // shrink the watermark; the full-resolution image still embeds losslessly.\n    const MAX_IMAGE_PAGE_DIMENSION = 1000;\n    const longestSide = Math.max(image.widthInPoints, image.heightInPoints);\n    const scale =\n      longestSide > MAX_IMAGE_PAGE_DIMENSION\n        ? MAX_IMAGE_PAGE_DIMENSION / longestSide\n        : 1;\n    const widthPt = image.widthInPoints * scale;\n    const heightPt = image.heightInPoints * scale;\n    const page = pdf.addPage({ width: widthPt, height: heightPt });\n    page.drawImage(image, { x: 0, y: 0, width: widthPt, height: heightPt });\n    pages = [page];\n  } else {\n    pdf = await PDF.load(fileBytes);\n    pages = pdf.getPages();\n  }\n\n  for (let i = 0; i < pages.length; i++) {\n    insertWatermark(pages[i], watermarkConfig, viewerData);\n    if ((i + 1) % 25 === 0) {\n      onProgress?.(`Watermarked ${i + 1}/${pages.length} pages`);\n    }\n  }\n\n  if (flatten) {\n    // Flatten forms, annotations, and optional-content layers so nothing can\n    // be toggled/removed. Best-effort: never fail the download over this.\n    try {\n      pdf.flattenAll();\n      onProgress?.(\"Flattened form/annotation/layer content\");\n    } catch (error) {\n      onProgress?.(\n        `flattenAll failed, falling back to form flatten: ${\n          error instanceof Error ? error.message : String(error)\n        }`,\n      );\n      try {\n        pdf.getForm()?.flatten();\n      } catch {\n        // No form / unsupported – ignore.\n      }\n    }\n  }\n\n  return await pdf.save();\n}\n",
      "asOf": "2026-11-19"
    },
    "F247": {
      "label": "Project source file, @libpdf/core",
      "display": "lib/utils/watermark-pdf.ts",
      "asOf": "2026-11-19"
    },
    "F248": {
      "label": "Project full_name, @libpdf/core",
      "display": "papermark/papermark",
      "asOf": "2026-11-19"
    },
    "F249": {
      "label": "Project stargazers_count, @libpdf/core",
      "display": "9.4K",
      "asOf": "2026-11-19"
    },
    "F250": {
      "label": "Library name, html2canvas",
      "display": "html2canvas",
      "asOf": "2026-11-17"
    },
    "F251": {
      "label": "Developer need, pdf-lib",
      "display": "Editing existing PDFs",
      "asOf": "2026-11-17"
    },
    "F252": {
      "label": "Pick reason, pdf-lib",
      "display": "modifies pages and form fields",
      "asOf": "2026-11-17"
    },
    "F253": {
      "label": "Developer need, jsPDF",
      "display": "Drawing a PDF in the browser",
      "asOf": "2026-11-17"
    },
    "F254": {
      "label": "Pick reason, jsPDF",
      "display": "draws text and shapes, then saves",
      "asOf": "2026-11-17"
    },
    "F255": {
      "label": "Developer need, PDFKit",
      "display": "Streaming PDFs from Node.js",
      "asOf": "2026-11-17"
    },
    "F256": {
      "label": "Pick reason, PDFKit",
      "display": "writes the PDF as a stream",
      "asOf": "2026-11-17"
    },
    "F257": {
      "label": "Developer need, @react-pdf/renderer",
      "display": "PDFs from React components",
      "asOf": "2026-11-17"
    },
    "F258": {
      "label": "Pick reason, @react-pdf/renderer",
      "display": "renders React components to PDF",
      "asOf": "2026-11-17"
    },
    "F259": {
      "label": "Developer need, pdfmake",
      "display": "Declarative layouts with tables",
      "asOf": "2026-11-17"
    },
    "F260": {
      "label": "Pick reason, pdfmake",
      "display": "builds layouts from definitions",
      "asOf": "2026-11-17"
    },
    "F261": {
      "label": "Developer need, @cantoo/pdf-lib",
      "display": "pdf-lib with extra features",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "Pick reason, @cantoo/pdf-lib",
      "display": "maintained fork of pdf-lib",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Developer need, html2pdf.js",
      "display": "Saving a web page as PDF",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Pick reason, html2pdf.js",
      "display": "captures a page in the browser",
      "asOf": "2026-11-17"
    },
    "F265": {
      "label": "Developer need, LibPDF",
      "display": "Malformed or signed PDFs",
      "asOf": "2026-11-17"
    },
    "F266": {
      "label": "Pick reason, LibPDF",
      "display": "parses leniently and signs",
      "asOf": "2026-11-17"
    },
    "F267": {
      "label": "Limitation lead",
      "display": "Browser only",
      "asOf": "2026-11-17"
    },
    "F268": {
      "label": "Limitation body",
      "display": "The library needs a browser and won't run in Node.js.",
      "asOf": "2026-11-17"
    },
    "F269": {
      "label": "Limitation lead",
      "display": "Beta software",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "Limitation body",
      "display": "APIs may change between minor versions.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-19",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "JavaScript PDF libraries pdf-lib jsPDF pdfmake PDFKit create modify forms tables HTML code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
