Showing preview only (3,315K chars total). Download the full file or copy to clipboard to get everything.
Repository: diegomura/react-pdf
Branch: master
Commit: 16cf5bd7006e
Files: 831
Total size: 3.0 MB
Directory structure:
gitextract_95ou86zy/
├── .changeset/
│ ├── README.md
│ ├── config.json
│ ├── dirty-rocks-jam.md
│ ├── eighty-taxis-cross.md
│ ├── five-rockets-battle.md
│ └── pretty-carrots-obey.md
├── .gitattributes
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── no-response.yml
│ └── workflows/
│ ├── main.yml
│ └── release.yml
├── .gitignore
├── .husky/
│ └── pre-commit
├── .nvmrc
├── .prettierignore
├── .prettierrc
├── LICENSE
├── README.md
├── babel.config.js
├── e2e/
│ ├── node-cjs/
│ │ ├── CHANGELOG.md
│ │ ├── index.js
│ │ └── package.json
│ └── node-esm/
│ ├── CHANGELOG.md
│ ├── index.js
│ └── package.json
├── eslint.config.ts
├── lerna.json
├── package.json
├── packages/
│ ├── examples/
│ │ ├── dev.sh
│ │ ├── next-14/
│ │ │ ├── .gitignore
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── app/
│ │ │ │ ├── globals.css
│ │ │ │ ├── layout.js
│ │ │ │ └── page.js
│ │ │ ├── jsconfig.json
│ │ │ ├── next.config.mjs
│ │ │ ├── package.json
│ │ │ ├── postcss.config.mjs
│ │ │ └── tailwind.config.js
│ │ ├── next-15/
│ │ │ ├── .gitignore
│ │ │ ├── CHANGELOG.md
│ │ │ ├── README.md
│ │ │ ├── app/
│ │ │ │ ├── globals.css
│ │ │ │ ├── layout.js
│ │ │ │ └── page.js
│ │ │ ├── jsconfig.json
│ │ │ ├── next.config.mjs
│ │ │ ├── package.json
│ │ │ ├── postcss.config.mjs
│ │ │ └── tailwind.config.js
│ │ ├── package.json
│ │ └── vite/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── declarations.d.ts
│ │ ├── package.json
│ │ ├── postcss.config.js
│ │ ├── src/
│ │ │ ├── examples/
│ │ │ │ ├── duplicated-images/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── ellipsis/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── emoji/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── font-family-fallback/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── font-weight/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── forms/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── fractals/
│ │ │ │ │ ├── Fractal.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── go-to/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── image-stress-test/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── index.ts
│ │ │ │ ├── jpg-orientation/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── knobs/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── link/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── media-queries/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── min-presence-ahead/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── multiline-text/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── object-fit/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── page-wrap/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── resume/
│ │ │ │ │ ├── Education.tsx
│ │ │ │ │ ├── Experience.tsx
│ │ │ │ │ ├── Header.tsx
│ │ │ │ │ ├── List.tsx
│ │ │ │ │ ├── Skills.tsx
│ │ │ │ │ ├── Title.tsx
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── soft-hyphens/
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── svg/
│ │ │ │ │ ├── Car.tsx
│ │ │ │ │ ├── Heart.tsx
│ │ │ │ │ ├── Pattern.tsx
│ │ │ │ │ ├── Star.tsx
│ │ │ │ │ ├── Svg1.tsx
│ │ │ │ │ ├── Svg2.tsx
│ │ │ │ │ ├── Svg4.tsx
│ │ │ │ │ ├── index.tsx
│ │ │ │ │ └── svg.tsx
│ │ │ │ ├── svg-transform/
│ │ │ │ │ └── index.tsx
│ │ │ │ └── transform-origin/
│ │ │ │ └── index.tsx
│ │ │ ├── index.css
│ │ │ ├── index.html
│ │ │ └── index.tsx
│ │ ├── tailwind.config.js
│ │ └── vite.config.js
│ ├── fns/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── adjust.ts
│ │ │ ├── asyncCompose.ts
│ │ │ ├── capitalize.ts
│ │ │ ├── castArray.ts
│ │ │ ├── compose.ts
│ │ │ ├── dropLast.ts
│ │ │ ├── evolve.ts
│ │ │ ├── get.ts
│ │ │ ├── index.ts
│ │ │ ├── isNil.ts
│ │ │ ├── last.ts
│ │ │ ├── mapValues.ts
│ │ │ ├── matchPercent.ts
│ │ │ ├── omit.ts
│ │ │ ├── parseFloat.ts
│ │ │ ├── pick.ts
│ │ │ ├── repeat.ts
│ │ │ ├── reverse.ts
│ │ │ ├── upperFirst.ts
│ │ │ └── without.ts
│ │ ├── tests/
│ │ │ ├── adjust.test.ts
│ │ │ ├── asyncCompose.test.ts
│ │ │ ├── capitalize.test.ts
│ │ │ ├── castArray.test.ts
│ │ │ ├── compose.test.ts
│ │ │ ├── dropLast.test.ts
│ │ │ ├── evolve.test.ts
│ │ │ ├── get.test.ts
│ │ │ ├── isNil.test.ts
│ │ │ ├── last.test.ts
│ │ │ ├── mapValues.test.ts
│ │ │ ├── matchPercent.test.ts
│ │ │ ├── omit.test.ts
│ │ │ ├── parseFloat.test.ts
│ │ │ ├── pick.test.ts
│ │ │ ├── repeat.test.ts
│ │ │ ├── reverse.test.ts
│ │ │ ├── upperFirst.test.ts
│ │ │ └── without.test.ts
│ │ └── tsconfig.json
│ ├── font/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── declarations.d.ts
│ │ ├── globals.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── font-family.ts
│ │ │ ├── font-source.ts
│ │ │ ├── index.ts
│ │ │ ├── standard-font.ts
│ │ │ └── types.ts
│ │ ├── tests/
│ │ │ ├── fallback-weights.test.ts
│ │ │ ├── font-store.test.ts
│ │ │ └── standard-fonts.test.ts
│ │ └── tsconfig.json
│ ├── image/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── declarations.d.ts
│ │ ├── globals.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── cache.ts
│ │ │ ├── index.ts
│ │ │ ├── jpeg.ts
│ │ │ ├── png.ts
│ │ │ ├── resolve.ts
│ │ │ └── types.ts
│ │ ├── tests/
│ │ │ ├── cache.test.ts
│ │ │ ├── resolve.test.ts
│ │ │ └── types.ts
│ │ ├── tsconfig.json
│ │ ├── vitest.config.js
│ │ └── vitest.setup.js
│ ├── layout/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── globals.d.ts
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── setupTests.js
│ │ ├── src/
│ │ │ ├── canvas/
│ │ │ │ └── measureCanvas.ts
│ │ │ ├── image/
│ │ │ │ ├── fetchImage.ts
│ │ │ │ ├── getRatio.ts
│ │ │ │ ├── getSource.ts
│ │ │ │ ├── measureImage.ts
│ │ │ │ └── resolveSource.ts
│ │ │ ├── index.ts
│ │ │ ├── node/
│ │ │ │ ├── createInstances.ts
│ │ │ │ ├── getBorderWidth.ts
│ │ │ │ ├── getDimension.ts
│ │ │ │ ├── getMargin.ts
│ │ │ │ ├── getOrigin.ts
│ │ │ │ ├── getPadding.ts
│ │ │ │ ├── getPosition.ts
│ │ │ │ ├── getWrap.ts
│ │ │ │ ├── isFixed.ts
│ │ │ │ ├── removePaddings.ts
│ │ │ │ ├── setAlign.ts
│ │ │ │ ├── setAlignContent.ts
│ │ │ │ ├── setAlignItems.ts
│ │ │ │ ├── setAlignSelf.ts
│ │ │ │ ├── setAspectRatio.ts
│ │ │ │ ├── setBorderWidth.ts
│ │ │ │ ├── setDimension.ts
│ │ │ │ ├── setDisplay.ts
│ │ │ │ ├── setFlexBasis.ts
│ │ │ │ ├── setFlexDirection.ts
│ │ │ │ ├── setFlexGrow.ts
│ │ │ │ ├── setFlexShrink.ts
│ │ │ │ ├── setFlexWrap.ts
│ │ │ │ ├── setGap.ts
│ │ │ │ ├── setJustifyContent.ts
│ │ │ │ ├── setMargin.ts
│ │ │ │ ├── setOverflow.ts
│ │ │ │ ├── setPadding.ts
│ │ │ │ ├── setPosition.ts
│ │ │ │ ├── setPositionType.ts
│ │ │ │ ├── setYogaValue.ts
│ │ │ │ ├── shouldBreak.ts
│ │ │ │ └── splitNode.ts
│ │ │ ├── page/
│ │ │ │ ├── getContentArea.ts
│ │ │ │ ├── getOrientation.ts
│ │ │ │ ├── getSize.ts
│ │ │ │ ├── getWrapArea.ts
│ │ │ │ ├── isHeightAuto.ts
│ │ │ │ ├── isLandscape.ts
│ │ │ │ └── isPortrait.ts
│ │ │ ├── steps/
│ │ │ │ ├── resolveAssets.ts
│ │ │ │ ├── resolveBookmarks.ts
│ │ │ │ ├── resolveDimensions.ts
│ │ │ │ ├── resolveInheritance.ts
│ │ │ │ ├── resolveLinkSubstitution.ts
│ │ │ │ ├── resolveOrigins.ts
│ │ │ │ ├── resolvePagePaddings.ts
│ │ │ │ ├── resolvePageSizes.ts
│ │ │ │ ├── resolvePagination.ts
│ │ │ │ ├── resolvePercentHeight.ts
│ │ │ │ ├── resolvePercentRadius.ts
│ │ │ │ ├── resolveStyles.ts
│ │ │ │ ├── resolveSvg.ts
│ │ │ │ ├── resolveTextLayout.ts
│ │ │ │ ├── resolveYoga.ts
│ │ │ │ └── resolveZIndex.ts
│ │ │ ├── svg/
│ │ │ │ ├── getContainer.ts
│ │ │ │ ├── getDefs.ts
│ │ │ │ ├── inheritProps.ts
│ │ │ │ ├── layoutText.ts
│ │ │ │ ├── measureSvg.ts
│ │ │ │ ├── parseAspectRatio.ts
│ │ │ │ ├── parseViewbox.ts
│ │ │ │ └── replaceDefs.ts
│ │ │ ├── text/
│ │ │ │ ├── emoji.ts
│ │ │ │ ├── getAttributedString.ts
│ │ │ │ ├── heightAtLineIndex.ts
│ │ │ │ ├── ignoreChars.ts
│ │ │ │ ├── layoutText.ts
│ │ │ │ ├── lineIndexAtHeight.ts
│ │ │ │ ├── linesHeight.ts
│ │ │ │ ├── linesWidth.ts
│ │ │ │ ├── measureText.ts
│ │ │ │ ├── splitText.ts
│ │ │ │ └── transformText.ts
│ │ │ ├── types/
│ │ │ │ ├── base.ts
│ │ │ │ ├── canvas.ts
│ │ │ │ ├── checkbox.ts
│ │ │ │ ├── circle.ts
│ │ │ │ ├── clip-path.ts
│ │ │ │ ├── defs.ts
│ │ │ │ ├── document.ts
│ │ │ │ ├── ellipse.ts
│ │ │ │ ├── field-set.ts
│ │ │ │ ├── g.ts
│ │ │ │ ├── image.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── line.ts
│ │ │ │ ├── linear-gradient.ts
│ │ │ │ ├── link.ts
│ │ │ │ ├── node.ts
│ │ │ │ ├── note.ts
│ │ │ │ ├── page.ts
│ │ │ │ ├── path.ts
│ │ │ │ ├── polygon.ts
│ │ │ │ ├── polyline.ts
│ │ │ │ ├── radial-gradient.ts
│ │ │ │ ├── rect.ts
│ │ │ │ ├── select.ts
│ │ │ │ ├── stop.ts
│ │ │ │ ├── svg.ts
│ │ │ │ ├── text-input.ts
│ │ │ │ ├── text-instance.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── tspan.ts
│ │ │ │ └── view.ts
│ │ │ └── yoga/
│ │ │ └── index.ts
│ │ ├── tests/
│ │ │ ├── image/
│ │ │ │ ├── getSource.test.ts
│ │ │ │ └── resolveSource.test.ts
│ │ │ ├── node/
│ │ │ │ ├── getBorderWidth.test.ts
│ │ │ │ ├── getDimension.test.ts
│ │ │ │ ├── getMargin.test.ts
│ │ │ │ ├── getOrigin.test.ts
│ │ │ │ ├── getPadding.test.ts
│ │ │ │ ├── getPosition.test.ts
│ │ │ │ ├── removePaddings.test.ts
│ │ │ │ ├── setAlignContent.test.ts
│ │ │ │ ├── setAlignItems.test.ts
│ │ │ │ ├── setAlignSelf.test.ts
│ │ │ │ ├── setAspectRatio.test.ts
│ │ │ │ ├── setBorderWidth.test.ts
│ │ │ │ ├── setDimension.test.ts
│ │ │ │ ├── setDisplay.test.ts
│ │ │ │ ├── setFlexBasis.test.ts
│ │ │ │ ├── setFlexDirection.test.ts
│ │ │ │ ├── setFlexGrow.test.ts
│ │ │ │ ├── setFlexShrink.test.ts
│ │ │ │ ├── setFlexWrap.test.ts
│ │ │ │ ├── setGap.test.ts
│ │ │ │ ├── setJustifyContent.test.ts
│ │ │ │ ├── setMargin.test.ts
│ │ │ │ ├── setOverflow.test.ts
│ │ │ │ ├── setPadding.test.ts
│ │ │ │ ├── setPosition.test.ts
│ │ │ │ ├── setPositionType.test.ts
│ │ │ │ └── shouldBreak.test.ts
│ │ │ ├── page/
│ │ │ │ ├── getOrientation.test.ts
│ │ │ │ ├── getSize.test.ts
│ │ │ │ ├── isHeightAuto.test.ts
│ │ │ │ ├── isLandscape.test.ts
│ │ │ │ └── isPortrait.test.ts
│ │ │ ├── steps/
│ │ │ │ ├── __snapshots__/
│ │ │ │ │ ├── resolveLinkSubstitution.test.ts.snap
│ │ │ │ │ ├── resolveOrigins.test.ts.snap
│ │ │ │ │ ├── resolvePagePaddings.test.ts.snap
│ │ │ │ │ ├── resolvePercentHeight.test.ts.snap
│ │ │ │ │ └── resolveStyles.test.ts.snap
│ │ │ │ ├── resolveBookmarks.test.ts
│ │ │ │ ├── resolveInhritance.test.ts
│ │ │ │ ├── resolveLinkSubstitution.test.ts
│ │ │ │ ├── resolveOrigins.test.ts
│ │ │ │ ├── resolvePagePaddings.test.ts
│ │ │ │ ├── resolvePageSizes.test.ts
│ │ │ │ ├── resolvePagination.test.ts
│ │ │ │ ├── resolvePercentHeight.test.ts
│ │ │ │ ├── resolveStyles.test.ts
│ │ │ │ ├── resolveSvg.test.ts
│ │ │ │ └── resolveTextLayout.test.ts
│ │ │ └── text/
│ │ │ ├── heightAtLineIndex.test.ts
│ │ │ ├── layoutText.test.ts
│ │ │ ├── lineIndexAtHeight.test.ts
│ │ │ └── measureText.test.ts
│ │ └── tsconfig.json
│ ├── pdfkit/
│ │ ├── .gitignore
│ │ ├── .prettierrc
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── babel.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── abstract_reference.js
│ │ │ ├── data.js
│ │ │ ├── document.js
│ │ │ ├── font/
│ │ │ │ ├── afm.js
│ │ │ │ ├── data/
│ │ │ │ │ ├── Courier-Bold.afm
│ │ │ │ │ ├── Courier-BoldOblique.afm
│ │ │ │ │ ├── Courier-Oblique.afm
│ │ │ │ │ ├── Courier.afm
│ │ │ │ │ ├── Helvetica-Bold.afm
│ │ │ │ │ ├── Helvetica-BoldOblique.afm
│ │ │ │ │ ├── Helvetica-Oblique.afm
│ │ │ │ │ ├── Helvetica.afm
│ │ │ │ │ ├── Times-Bold.afm
│ │ │ │ │ ├── Times-BoldItalic.afm
│ │ │ │ │ ├── Times-Italic.afm
│ │ │ │ │ ├── Times-Roman.afm
│ │ │ │ │ ├── compressData.js
│ │ │ │ │ └── expandData.js
│ │ │ │ ├── embedded.js
│ │ │ │ └── standard.js
│ │ │ ├── font.js
│ │ │ ├── font_factory.js
│ │ │ ├── gradient.js
│ │ │ ├── image/
│ │ │ │ ├── jpeg.js
│ │ │ │ └── png.js
│ │ │ ├── image.js
│ │ │ ├── index.js
│ │ │ ├── line_wrapper.js
│ │ │ ├── metadata.js
│ │ │ ├── mixins/
│ │ │ │ ├── acroform.js
│ │ │ │ ├── annotations.js
│ │ │ │ ├── attachments.js
│ │ │ │ ├── color.js
│ │ │ │ ├── fonts.js
│ │ │ │ ├── images.js
│ │ │ │ ├── markings.js
│ │ │ │ ├── metadata.js
│ │ │ │ ├── outline.js
│ │ │ │ ├── pdfa.js
│ │ │ │ ├── pdfua.js
│ │ │ │ ├── subsets.js
│ │ │ │ ├── text.js
│ │ │ │ └── vector.js
│ │ │ ├── name_tree.js
│ │ │ ├── number_tree.js
│ │ │ ├── object.js
│ │ │ ├── outline.js
│ │ │ ├── page.js
│ │ │ ├── path.js
│ │ │ ├── pattern.js
│ │ │ ├── reference.js
│ │ │ ├── security.js
│ │ │ ├── spotcolor.js
│ │ │ ├── structure_content.js
│ │ │ ├── structure_element.js
│ │ │ ├── tree.js
│ │ │ ├── utils/
│ │ │ │ └── range.js
│ │ │ ├── utils.js
│ │ │ └── virtual-fs.js
│ │ └── tests/
│ │ └── font/
│ │ └── standard.test.ts
│ ├── png-js/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── babel.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ └── src/
│ │ └── index.js
│ ├── primitives/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── babel.config.js
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ └── index.ts
│ │ ├── tests/
│ │ │ └── index.test.ts
│ │ └── tsconfig.json
│ ├── reconciler/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── build/
│ │ │ └── trim-reconciler.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── propsEqual.ts
│ │ │ ├── reconciler-23.ts
│ │ │ ├── reconciler-31.ts
│ │ │ ├── reconciler-33.ts
│ │ │ └── types.ts
│ │ ├── tests/
│ │ │ └── propsEqual.test.ts
│ │ └── tsconfig.json
│ ├── render/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── globals.d.ts
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── index.ts
│ │ │ ├── operations/
│ │ │ │ ├── addBookmarks.ts
│ │ │ │ ├── clipNode.ts
│ │ │ │ ├── embedImage.ts
│ │ │ │ ├── setDestination.ts
│ │ │ │ ├── setLink.ts
│ │ │ │ └── transform.ts
│ │ │ ├── primitives/
│ │ │ │ ├── renderBackground.ts
│ │ │ │ ├── renderBorders.ts
│ │ │ │ ├── renderCanvas.ts
│ │ │ │ ├── renderCheckbox.ts
│ │ │ │ ├── renderCircle.ts
│ │ │ │ ├── renderDebug.ts
│ │ │ │ ├── renderEllipse.ts
│ │ │ │ ├── renderFieldSet.ts
│ │ │ │ ├── renderGlyphs.ts
│ │ │ │ ├── renderGroup.ts
│ │ │ │ ├── renderImage.ts
│ │ │ │ ├── renderLine.ts
│ │ │ │ ├── renderList.ts
│ │ │ │ ├── renderNode.ts
│ │ │ │ ├── renderNote.ts
│ │ │ │ ├── renderPage.ts
│ │ │ │ ├── renderPath.ts
│ │ │ │ ├── renderPolygon.ts
│ │ │ │ ├── renderPolyline.ts
│ │ │ │ ├── renderRect.ts
│ │ │ │ ├── renderSelect.ts
│ │ │ │ ├── renderSvg.ts
│ │ │ │ ├── renderSvgImage.ts
│ │ │ │ ├── renderSvgText.ts
│ │ │ │ ├── renderText.ts
│ │ │ │ └── renderTextInput.ts
│ │ │ ├── svg/
│ │ │ │ ├── getBoundingBox.ts
│ │ │ │ └── parsePoints.ts
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── parseColor.ts
│ │ │ ├── parseFormOptions.ts
│ │ │ └── resolveObjectFit.ts
│ │ ├── tests/
│ │ │ ├── ctx.ts
│ │ │ ├── operations/
│ │ │ │ └── setDestination.test.ts
│ │ │ ├── primitives/
│ │ │ │ ├── renderBackground.test.ts
│ │ │ │ ├── renderCanvas.test.ts
│ │ │ │ ├── renderCircle.test.ts
│ │ │ │ ├── renderEllipse.test.ts
│ │ │ │ └── renderForm.test.ts
│ │ │ ├── svg/
│ │ │ │ ├── getBoundingBox.test.ts
│ │ │ │ └── parsePoints.test.ts
│ │ │ └── utils/
│ │ │ ├── objectFit.test.ts
│ │ │ └── parseColor.test.ts
│ │ └── tsconfig.json
│ ├── renderer/
│ │ ├── .gitignore
│ │ ├── .size-limit.cjs
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── babel.config.js
│ │ ├── index.d.ts
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── dom/
│ │ │ │ ├── BlobProvider.js
│ │ │ │ ├── PDFDownloadLink.js
│ │ │ │ ├── PDFViewer.js
│ │ │ │ ├── index.js
│ │ │ │ └── usePDF.js
│ │ │ ├── index.js
│ │ │ ├── node/
│ │ │ │ ├── index.js
│ │ │ │ └── renderTo.js
│ │ │ ├── renderer.js
│ │ │ └── utils.js
│ │ ├── tests/
│ │ │ ├── components.test.jsx
│ │ │ ├── debug.test.jsx
│ │ │ ├── dom.test.jsx
│ │ │ ├── emoji.test.jsx
│ │ │ ├── environment/
│ │ │ │ └── jsdom.js
│ │ │ ├── flex.test.jsx
│ │ │ ├── gap.test.jsx
│ │ │ ├── images.test.jsx
│ │ │ ├── link.test.jsx
│ │ │ ├── namedDestinations.test.jsx
│ │ │ ├── node.test.jsx
│ │ │ ├── orphanTexts.test.jsx
│ │ │ ├── pageWrap.test.jsx
│ │ │ ├── renderComponent.js
│ │ │ ├── resume.test.jsx
│ │ │ ├── svg.test.jsx
│ │ │ ├── svgs.jsx
│ │ │ ├── text.test.jsx
│ │ │ ├── transform.test.jsx
│ │ │ └── usePDF.test.jsx
│ │ ├── vitest.browser.config.js
│ │ ├── vitest.config.js
│ │ └── vitest.setup.js
│ ├── stylesheet/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── globals.d.ts
│ │ ├── jest.config.js
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── flatten/
│ │ │ │ └── index.ts
│ │ │ ├── index.ts
│ │ │ ├── mediaQueries/
│ │ │ │ └── index.ts
│ │ │ ├── resolve/
│ │ │ │ ├── borders.ts
│ │ │ │ ├── boxModel.ts
│ │ │ │ ├── colors.ts
│ │ │ │ ├── dimensions.ts
│ │ │ │ ├── flex.ts
│ │ │ │ ├── gap.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layout.ts
│ │ │ │ ├── margins.ts
│ │ │ │ ├── paddings.ts
│ │ │ │ ├── positioning.ts
│ │ │ │ ├── svg.ts
│ │ │ │ ├── text.ts
│ │ │ │ ├── transform.ts
│ │ │ │ └── utils.ts
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── castFloat.ts
│ │ │ ├── castInt.ts
│ │ │ ├── colors.ts
│ │ │ ├── offsetKeyword.ts
│ │ │ └── units.ts
│ │ ├── tests/
│ │ │ ├── borders.test.ts
│ │ │ ├── colors.test.ts
│ │ │ ├── dimensions.test.ts
│ │ │ ├── flatten.test.ts
│ │ │ ├── flex.test.ts
│ │ │ ├── gap.test.ts
│ │ │ ├── layout.test.ts
│ │ │ ├── margins.test.ts
│ │ │ ├── mediaQueries.test.ts
│ │ │ ├── paddings.test.ts
│ │ │ ├── positioning.test.ts
│ │ │ ├── resolve.test.ts
│ │ │ ├── text.test.ts
│ │ │ └── transform.test.ts
│ │ └── tsconfig.json
│ ├── textkit/
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── rollup.config.js
│ │ ├── src/
│ │ │ ├── attributedString/
│ │ │ │ ├── advanceWidth.ts
│ │ │ │ ├── advanceWidthBetween.ts
│ │ │ │ ├── append.ts
│ │ │ │ ├── ascent.ts
│ │ │ │ ├── descent.ts
│ │ │ │ ├── dropLast.ts
│ │ │ │ ├── empty.ts
│ │ │ │ ├── end.ts
│ │ │ │ ├── fromFragments.ts
│ │ │ │ ├── glyphWidthAt.ts
│ │ │ │ ├── height.ts
│ │ │ │ ├── indexAtOffset.ts
│ │ │ │ ├── insertGlyph.ts
│ │ │ │ ├── leadingOffset.ts
│ │ │ │ ├── length.ts
│ │ │ │ ├── prepend.ts
│ │ │ │ ├── runAt.ts
│ │ │ │ ├── runIndexAt.ts
│ │ │ │ ├── slice.ts
│ │ │ │ ├── sliceAtOffset.ts
│ │ │ │ ├── start.ts
│ │ │ │ ├── trailingOffset.ts
│ │ │ │ └── trim.ts
│ │ │ ├── engines/
│ │ │ │ ├── bidi/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── fontSubstitution/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── justification/
│ │ │ │ │ ├── getDistances.ts
│ │ │ │ │ ├── getFactors.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── types.ts
│ │ │ │ ├── linebreaker/
│ │ │ │ │ ├── bestFit.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── knuthPlass.ts
│ │ │ │ │ ├── linkedList.ts
│ │ │ │ │ └── types.ts
│ │ │ │ ├── scriptItemizer/
│ │ │ │ │ └── index.ts
│ │ │ │ ├── textDecoration/
│ │ │ │ │ └── index.ts
│ │ │ │ └── wordHyphenation/
│ │ │ │ └── index.ts
│ │ │ ├── glyph/
│ │ │ │ ├── fromCodePoint.ts
│ │ │ │ ├── isWhiteSpace.ts
│ │ │ │ └── slice.ts
│ │ │ ├── index.ts
│ │ │ ├── indices/
│ │ │ │ ├── append.ts
│ │ │ │ ├── normalize.ts
│ │ │ │ ├── prepend.ts
│ │ │ │ └── resolve.ts
│ │ │ ├── layout/
│ │ │ │ ├── applyDefaultStyles.ts
│ │ │ │ ├── bidiMirroring.ts
│ │ │ │ ├── bidiReordering.ts
│ │ │ │ ├── finalizeFragments.ts
│ │ │ │ ├── generateGlyphs.ts
│ │ │ │ ├── generateLineRects.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── layoutParagraph.ts
│ │ │ │ ├── preprocessRuns.ts
│ │ │ │ ├── resolveAttachments.ts
│ │ │ │ ├── resolveYOffset.ts
│ │ │ │ ├── splitParagraphs.ts
│ │ │ │ ├── typesetter.ts
│ │ │ │ ├── verticalAlign.ts
│ │ │ │ └── wrapWords.ts
│ │ │ ├── paragraph/
│ │ │ │ ├── height.ts
│ │ │ │ ├── sliceAtHeight.ts
│ │ │ │ └── truncate.ts
│ │ │ ├── positions/
│ │ │ │ └── advanceWidth.ts
│ │ │ ├── rect/
│ │ │ │ ├── area.ts
│ │ │ │ ├── bottomLeft.ts
│ │ │ │ ├── bottomRight.ts
│ │ │ │ ├── copy.ts
│ │ │ │ ├── crop.ts
│ │ │ │ ├── empty.ts
│ │ │ │ ├── equals.ts
│ │ │ │ ├── intersects.ts
│ │ │ │ ├── maxX.ts
│ │ │ │ ├── maxY.ts
│ │ │ │ └── partition.ts
│ │ │ ├── run/
│ │ │ │ ├── add.ts
│ │ │ │ ├── advanceWidth.ts
│ │ │ │ ├── advanceWidthBetween.ts
│ │ │ │ ├── append.ts
│ │ │ │ ├── ascent.ts
│ │ │ │ ├── concat.ts
│ │ │ │ ├── descent.ts
│ │ │ │ ├── dropLast.ts
│ │ │ │ ├── empty.ts
│ │ │ │ ├── filter.ts
│ │ │ │ ├── flatten.ts
│ │ │ │ ├── getFont.ts
│ │ │ │ ├── glyphIndexAt.ts
│ │ │ │ ├── height.ts
│ │ │ │ ├── indexAtOffset.ts
│ │ │ │ ├── insert.ts
│ │ │ │ ├── isEmpty.ts
│ │ │ │ ├── isWhiteSpace.ts
│ │ │ │ ├── leadingOffset.ts
│ │ │ │ ├── length.ts
│ │ │ │ ├── lineGap.ts
│ │ │ │ ├── offset.ts
│ │ │ │ ├── omit.ts
│ │ │ │ ├── prepend.ts
│ │ │ │ ├── runIndexAt.ts
│ │ │ │ ├── scale.ts
│ │ │ │ ├── slice.ts
│ │ │ │ ├── sort.ts
│ │ │ │ ├── subtract.ts
│ │ │ │ └── trailingOffset.ts
│ │ │ ├── types.ts
│ │ │ └── utils/
│ │ │ ├── isNumber.ts
│ │ │ └── stringFromCodePoints.ts
│ │ ├── tests/
│ │ │ ├── attributedString/
│ │ │ │ ├── advanceWidth.test.ts
│ │ │ │ ├── advanceWidthBetween.test.ts
│ │ │ │ ├── append.test.ts
│ │ │ │ ├── ascent.test.ts
│ │ │ │ ├── descent.test.ts
│ │ │ │ ├── dropLast.test.ts
│ │ │ │ ├── empty.test.ts
│ │ │ │ ├── end.test.ts
│ │ │ │ ├── fromFragments.test.ts
│ │ │ │ ├── height.test.ts
│ │ │ │ ├── indexAtOffset.test.ts
│ │ │ │ ├── insertGlyph.test.ts
│ │ │ │ ├── leadingOffset.test.ts
│ │ │ │ ├── length.test.ts
│ │ │ │ ├── prepend.test.ts
│ │ │ │ ├── runAt.test.ts
│ │ │ │ ├── runIndexAt.test.ts
│ │ │ │ ├── slice.test.ts
│ │ │ │ ├── sliceAtOffset.test.ts
│ │ │ │ ├── start.test.ts
│ │ │ │ ├── trailingOffset.test.ts
│ │ │ │ └── trim.test.ts
│ │ │ ├── engines/
│ │ │ │ ├── bidi.test.ts
│ │ │ │ ├── fontSubstitution.test.ts
│ │ │ │ ├── linebreaker.test.ts
│ │ │ │ ├── scriptItemizer.test.ts
│ │ │ │ └── wordHyphenation.test.ts
│ │ │ ├── glyph/
│ │ │ │ ├── fromCodePoint.test.ts
│ │ │ │ ├── isWhiteSpace.test.ts
│ │ │ │ └── slice.test.ts
│ │ │ ├── indices/
│ │ │ │ ├── append.test.ts
│ │ │ │ ├── normalize.test.ts
│ │ │ │ ├── prepend.test.ts
│ │ │ │ └── resolve.test.ts
│ │ │ ├── internal/
│ │ │ │ ├── bidiEngine.ts
│ │ │ │ ├── font.ts
│ │ │ │ ├── fontSubstitutionEngine.ts
│ │ │ │ ├── pluck.ts
│ │ │ │ └── scriptItemizer.ts
│ │ │ ├── layout/
│ │ │ │ ├── applyDefaultStyles.test.ts
│ │ │ │ ├── bidiMirroring.test.ts
│ │ │ │ ├── bidiReordering.test.ts
│ │ │ │ ├── generateGlyphs.test.ts
│ │ │ │ ├── layoutParagraph.test.ts
│ │ │ │ ├── preprocessRuns.test.ts
│ │ │ │ ├── resolveAttachments.test.ts
│ │ │ │ ├── resolveYOffset.test.ts
│ │ │ │ ├── splitParagraphs.test.ts
│ │ │ │ ├── verticalAlign.test.ts
│ │ │ │ └── wrapWords.test.ts
│ │ │ ├── rect/
│ │ │ │ ├── area.test.ts
│ │ │ │ ├── bottomLeft.test.ts
│ │ │ │ ├── bottomRight.test.ts
│ │ │ │ ├── copy.test.ts
│ │ │ │ ├── crop.test.ts
│ │ │ │ ├── empty.test.ts
│ │ │ │ ├── equals.test.ts
│ │ │ │ ├── intersects.test.ts
│ │ │ │ ├── maxX.test.ts
│ │ │ │ ├── maxY.test.ts
│ │ │ │ └── partition.test.ts
│ │ │ ├── run/
│ │ │ │ ├── add.test.ts
│ │ │ │ ├── advanceWidth.test.ts
│ │ │ │ ├── advanceWidthBetween.test.ts
│ │ │ │ ├── append.test.ts
│ │ │ │ ├── ascent.test.ts
│ │ │ │ ├── concat.test.ts
│ │ │ │ ├── descent.test.ts
│ │ │ │ ├── dropLast.test.ts
│ │ │ │ ├── empty.test.ts
│ │ │ │ ├── filter.test.ts
│ │ │ │ ├── flatten.test.ts
│ │ │ │ ├── getFont.test.ts
│ │ │ │ ├── glyphIndexAt.test.ts
│ │ │ │ ├── height.test.ts
│ │ │ │ ├── indexAtOffset.test.ts
│ │ │ │ ├── insert.test.ts
│ │ │ │ ├── isEmpty.test.ts
│ │ │ │ ├── leadingOffset.test.ts
│ │ │ │ ├── length.test.ts
│ │ │ │ ├── lineGap.test.ts
│ │ │ │ ├── offset.test.ts
│ │ │ │ ├── omit.test.ts
│ │ │ │ ├── prepend.test.ts
│ │ │ │ ├── runIndexAt.test.ts
│ │ │ │ ├── scale.test.ts
│ │ │ │ ├── slice.test.ts
│ │ │ │ ├── sort.test.ts
│ │ │ │ ├── subtract.test.ts
│ │ │ │ └── trailingOffset.test.ts
│ │ │ └── utils/
│ │ │ ├── isNumber.test.ts
│ │ │ └── stringFromCodePoints.test.ts
│ │ └── tsconfig.json
│ └── types/
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── bookmark.d.ts
│ ├── context.d.ts
│ ├── font.d.ts
│ ├── image.d.ts
│ ├── index.d.ts
│ ├── node.d.ts
│ ├── package.json
│ ├── page.d.ts
│ ├── pdf.d.ts
│ ├── primitive.d.ts
│ ├── style.d.ts
│ └── svg.d.ts
├── vitest.config.js
└── vitest.workspace.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .changeset/README.md
================================================
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
================================================
FILE: .changeset/config.json
================================================
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "diegomura/react-pdf" }
],
"commit": false,
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
},
"ignore": []
}
================================================
FILE: .changeset/dirty-rocks-jam.md
================================================
---
"@react-pdf/textkit": patch
---
feat(textkit): various improvements
================================================
FILE: .changeset/eighty-taxis-cross.md
================================================
---
"@react-pdf/fns": patch
---
feat(fns): various improvements
================================================
FILE: .changeset/five-rockets-battle.md
================================================
---
"@react-pdf/textkit": patch
---
fix: cannot read units for Em
================================================
FILE: .changeset/pretty-carrots-obey.md
================================================
---
"@react-pdf/font": patch
---
feat(font): various improvements
================================================
FILE: .gitattributes
================================================
packages/* linguist-vendored=false
examples/* linguist-vendored=false
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at diegomuracciole@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contribute
## Introduction
First, thank you for considering contributing to react-pdf!
We welcome any type of contribution, not only code. You can help with
- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
- **Marketing**: writing blog posts, howto's, printing stickers, ...
- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
- **Code**: take a look at the [open issues](https://github.com/diegomura/react-pdf/issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-pdf).
## Your First Contribution
Working on your first Pull Request? You can learn how from this _free_ series, [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
## Set up your development environment
react-pdf is a monorepo. That means the whole solution is broken into small pieces, or packages, each of which solves a specific problem. No need to worry much about it, since [Lerna](https://lerna.js.org/) does most of the work for us. If you are not familiarized with it it's always helpful to have an overall idea of how it works.
Here I present a quick guide about how to setup your development environment exactly as I have it when working on react-pdf. Please bare in mind small differences can be present depending on which environment you are running this library (on the web, node, electron, etc).
### 1. Clone react-pdf project
This goes without saying but first you need to download the code:
```sh
git clone https://github.com/diegomura/react-pdf.git
cd react-pdf
```
### 2. Install Node 18
If you have `nvm` installed all you have to do is:
```sh
nvm install 18
nvm use
```
Other versions should work although I can't guarantee it.
### 3. Install dependencies and boostrap monorepo
We need to download this project dependencies in order to make it work. Because this is a monorepo, we also have to bind all the internal packages together so they are aware of each other. Both things can be done by running:
```sh
yarn install
```
### 4. Build & watch codebase
In order to to quickly iterate in your development process, react-pdf has a watch script that builds all the required modules and waits for changes to happen to re-compile the affected packages. This is handy because enables you to have this process running on the background and just focus on coding what you want. All you have to do is:
```sh
yarn watch
```
### 5. Setup testing project
Now that we have react-pdf built and running, we need to setup a testing project to use as a development target. This might not be the most straightforward way to set up your dev environment but enables use of the lib as an "external" agent, just as end users will do. It's also extensible for testing in different environments, whether it is a web or node project, or electron or native app. I usually have a web project (just a plain [create react app](https://reactjs.org/docs/create-a-new-react-app.html) project), and a Node one.
### 6. Link your react-pdf build to your testing project
Now all we have to do is make our testing project point to our react-pdf watch instance so we can apply changes to it and see them working. For that I use `yarn link`.
On another terminal:
```sh
cd react-pdf/packages/renderer # navigate to react-pdf renderer package
yarn link
```
In our testing project:
```sh
yarn link @react-pdf/renderer
```
If everything went well, now your testing project should be running your local react-pdf build and any change in the codebase should be immediately accesible from your project.
<details>
<summary>A comment about react and react-dom</summary>
I observed that it's sometimes needed to apply the same linking process to both react and react-dom. This is becuase otherwise your local react-pdf build and your testing project will be using each a different react and react-dom instance, making react complain. All you have to do is
<pre>
# on your react-pdf project
cd react-pdf/node_modules/react
yarn link
cd ../react-dom
yarn link
# on your testing project
yarn link react
yarn link react-dom
</pre>
</details>
## Submitting code
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
## Code review process
The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
## Financial contributions
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/react-pdf).
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
## Questions
If you have any questions, create an [issue](https://github.com/diegomura/react-pdf/issues) (protip: do a quick search first to see if someone else didn't ask the same question before!).
You can also reach us at hello@react-pdf.opencollective.com.
## Credits
### Contributors
Thank you to all the people who have already contributed to react-pdf!
<a href="/diegomura/react-pdf/graphs/contributors"><img src="https://opencollective.com/react-pdf/contributors.svg?width=890" /></a>
### Backers
Thank you to all our backers! [[Become a backer](https://opencollective.com/react-pdf#backer)]
<a href="https://opencollective.com/react-pdf#backers" target="_blank"><img src="https://opencollective.com/react-pdf/backers.svg?width=890"></a>
<!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->
================================================
FILE: .github/FUNDING.yml
================================================
github: diegomura
open_collective: react-pdf
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior including code snippet (if applies):
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
_You can make use of [react-pdf REPL](https://react-pdf.org/repl) to share the snippet_
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. MacOS, Windows]
- Browser [e.g. chrome, safari]
- React-pdf version [e.g. v1.1.0]
<!-- Love react-pdf? Please consider supporting our collective:
👉 https://opencollective.com/react-pdf/donate -->
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: new feature
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/no-response.yml
================================================
# Configuration for probot-no-response - https://github.com/probot/no-response
daysUntilClose: 14
responseRequiredLabel: incomplete
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
================================================
FILE: .github/workflows/main.yml
================================================
name: CI
on:
pull_request:
branches:
- '**'
push:
branches:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 2
HUSKY: 0
NODE_VERSION: 20
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Check size
run: yarn lint
size:
name: Check size
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Check size
run: yarn --cwd packages/renderer run size
test:
name: Run unit tests (Node.js ${{ matrix.node_version }}; React ${{ matrix.react_version }})
runs-on: ubuntu-latest
strategy:
matrix:
# We aim to test all maintained LTS versions of Node.js as well as the latest stable version
node_version: [18, 20, 21]
react_version: [16, 17, 18]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Run tests
run: REACT_VERSION=${{ matrix.react_version }} yarn test
e2e-node:
name: Run E2E tests (Node.js ${{ matrix.node_version }}; ${{ matrix.cjs_or_esm == 'cjs' ? 'CJS' : 'ESM' }}) runs-on: ubuntu-latest
strategy:
matrix:
cjs_or_esm: [cjs, esm]
node_version: [18, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Run E2E tests
run: yarn --cwd e2e/node-${{ matrix.cjs_or_esm }} run start
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 2
HUSKY: 0
NODE_VERSION: 20
jobs:
test:
name: Run tests (Node.js ${{ matrix.node_version }}; React ${{ matrix.react_version }})
runs-on: ubuntu-latest
strategy:
matrix:
# We aim to test all maintained LTS versions of Node.js as well as the latest stable version
node_version: [18, 20, 21]
react_version: [16, 17, 18, 19]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Run tests
run: REACT_VERSION=${{ matrix.react_version }} yarn test
release:
# Prevents this action from running on forks
if: github.repository_owner == 'diegomura'
name: Create Release PR or Publish to npm
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Cache Yarn cache
uses: actions/cache@v4
env:
cache-name: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies and build
run: yarn --frozen-lockfile
- name: Create Release PR or Publish to npm
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
version: yarn version-packages
commit: 'chore: release packages'
title: 'chore: release packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
================================================
FILE: .gitignore
================================================
node_modules
*.log
dist
coverage
.jshintrc
.idea
.DS_Store
.cache
.parcel-cache
================================================
FILE: .husky/pre-commit
================================================
yarn lint-staged
================================================
FILE: .nvmrc
================================================
18
================================================
FILE: .prettierignore
================================================
yoga-layout
lib
packages/pdfkit
================================================
FILE: .prettierrc
================================================
{
"singleQuote": true
}
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2017 Diego Muracciole <diegomuracciole@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<img src="https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d081a8b9.png" height="280px">
<p align="center">React renderer for creating PDF files on the browser and server<p>
<p align="center">
<a href="https://www.npmjs.com/package/@react-pdf/renderer">
<img src="https://img.shields.io/npm/v/@react-pdf/renderer?style=flat&colorA=000000&colorB=000000" />
</a>
<a href="https://opencollective.com/react-pdf">
<img src="https://img.shields.io/opencollective/all/react-pdf?style=flat&colorA=000000&colorB=000000" />
</a>
<a href="https://github.com/diegomura/react-pdf/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/diegomura/react-pdf?style=flat&colorA=000000&colorB=000000" />
</a>
<a href="https://blockchain.com/btc/address/bc1qj223udztpmt5dck46dw0yap08yum63ht56h90v">
<img src="https://img.shields.io/badge/BTC-f5f5f5?style=flat&colorA=000000&colorB=000000" />
</a>
<a href="https://blockchain.com/eth/address/0x4e1DB76bA0858BbCAa4DD804418D0D9EcF77B1cC">
<img src="https://img.shields.io/badge/ETH-f5f5f5?style=flat&colorA=000000&colorB=000000" />
</a>
</p>
</p>
## Lost?
This package is used to _create_ PDFs using React. If you wish to _display_ existing PDFs, you may be looking for [react-pdf](https://github.com/wojtekmaj/react-pdf).
## How to install
```sh
yarn add @react-pdf/renderer
```
## How it works
```jsx
import React from 'react';
import { Document, Page, Text, View, StyleSheet } from '@react-pdf/renderer';
// Create styles
const styles = StyleSheet.create({
page: {
flexDirection: 'row',
backgroundColor: '#E4E4E4',
},
section: {
margin: 10,
padding: 10,
flexGrow: 1,
},
});
// Create Document Component
const MyDocument = () => (
<Document>
<Page size="A4" style={styles.page}>
<View style={styles.section}>
<Text>Section #1</Text>
</View>
<View style={styles.section}>
<Text>Section #2</Text>
</View>
</Page>
</Document>
);
```
### `Web.` Render in DOM
```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import { PDFViewer } from '@react-pdf/renderer';
const App = () => (
<PDFViewer>
<MyDocument />
</PDFViewer>
);
ReactDOM.render(<App />, document.getElementById('root'));
```
### `Node.` Save in a file
```jsx
import React from 'react';
import ReactPDF from '@react-pdf/renderer';
ReactPDF.render(<MyDocument />, `${__dirname}/example.pdf`);
```
## Contributors
This project exists thanks to all the people who contribute. Looking to contribute? Please check our [[contribute]](https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md) document for more details about how to setup a development environment and submitting code.
<a href="https://github.com/diegomura/react-pdf/blob/master/.github/CONTRIBUTING.md"><img src="https://opencollective.com/react-pdf/contributors.svg?width=890" /></a>
## Sponsors
Thank you to all our sponsors! [[Become a sponsors](https://opencollective.com/react-pdf#sponsors)]
<a href="https://opencollective.com/react-pdf#sponsors" target="_blank"><img src="https://opencollective.com/react-pdf/sponsors.svg?width=890"></a>
## Backers
Thank you to all our backers! [[Become a backer](https://opencollective.com/react-pdf#backer)]
<a href="https://opencollective.com/react-pdf#backers" target="_blank"><img src="https://opencollective.com/react-pdf/backers.svg?width=890"></a>
## License
MIT © [Diego Muracciole](http://github.com/diegomura)
---
[](https://www.npmjs.com/package/@react-pdf/renderer)
================================================
FILE: babel.config.js
================================================
export default {
presets: [
[
'@babel/preset-env',
{
loose: true,
targets: {
node: '18',
browsers: '>0.25%, not dead',
},
},
],
['@babel/preset-react', { runtime: 'automatic' }],
],
plugins: [
['@babel/plugin-transform-runtime', { version: '^7.19.6' }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-optional-chaining',
],
};
================================================
FILE: e2e/node-cjs/CHANGELOG.md
================================================
# @react-pdf/e2e-node-cjs
## 2.0.24
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.3.2
## 2.0.23
### Patch Changes
- Updated dependencies [[`dcc7b403`](https://github.com/diegomura/react-pdf/commit/dcc7b40313b5662b9bd16678fbc0b62eeaf65d71)]:
- @react-pdf/renderer@4.3.1
## 2.0.22
### Patch Changes
- Updated dependencies [[`01b4ff5c`](https://github.com/diegomura/react-pdf/commit/01b4ff5cb00420dd37c2f28fb95822dd18cdd982), [`f89f75c1`](https://github.com/diegomura/react-pdf/commit/f89f75c1f132ba19b54847c3ac23efec675f8d0a)]:
- @react-pdf/renderer@4.3.0
## 2.0.21
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.4
## 2.0.20
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.3
## 2.0.19
### Patch Changes
- Updated dependencies [[`226467e3`](https://github.com/diegomura/react-pdf/commit/226467e39443d3690b8f8c3298aa8278b43fbfa6)]:
- @react-pdf/renderer@4.2.2
## 2.0.18
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.1
## 2.0.17
### Patch Changes
- Updated dependencies [[`7cd71714`](https://github.com/diegomura/react-pdf/commit/7cd7171472b0f300db56b7805c5f966bf4ced6e2), [`685890bd`](https://github.com/diegomura/react-pdf/commit/685890bd841b7d2480157117fcd3cbb1334f6324)]:
- @react-pdf/renderer@4.2.0
## 2.0.16
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.6
## 2.0.15
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.5
## 2.0.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.4
## 2.0.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.3
## 2.0.12
### Patch Changes
- Updated dependencies [[`aab7d958`](https://github.com/diegomura/react-pdf/commit/aab7d95870d9073e4acb004aa0cce9cfa19b7f0e)]:
- @react-pdf/renderer@4.1.2
## 2.0.11
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.1
## 2.0.10
### Patch Changes
- Updated dependencies [[`52b2f253`](https://github.com/diegomura/react-pdf/commit/52b2f25349bee0c09399bc2e7e5e89db5e1433fd)]:
- @react-pdf/renderer@4.1.0
## 2.0.9
### Patch Changes
- Updated dependencies [[`7add014c`](https://github.com/diegomura/react-pdf/commit/7add014c6bc9cff649dd1a56fc47214888613b6b)]:
- @react-pdf/renderer@4.0.2
## 2.0.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.0.1
## 2.0.7
### Patch Changes
- Updated dependencies [[`afe4bcfe`](https://github.com/diegomura/react-pdf/commit/afe4bcfe6f4b991cf22341242fc27d169b758d47), [`70f29a04`](https://github.com/diegomura/react-pdf/commit/70f29a0407b1d56e9a7932b25c0d69132e9b4119)]:
- @react-pdf/renderer@4.0.0
## 2.0.6
### Patch Changes
- Updated dependencies [[`ed94775`](https://github.com/diegomura/react-pdf/commit/ed94775f4d44db0886ff08c71d09f446bace6392)]:
- @react-pdf/renderer@3.4.5
## 2.0.5
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.4
## 2.0.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.3
## 2.0.3
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.2
## 2.0.2
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.1
## 2.0.1
### Patch Changes
- Updated dependencies [[`fab09cc`](https://github.com/diegomura/react-pdf/commit/fab09cc9814326fdb44d2bcb7097ba9960d441d1)]:
- @react-pdf/renderer@3.4.0
================================================
FILE: e2e/node-cjs/index.js
================================================
const fs = require('node:fs/promises');
const assert = require('node:assert');
const { test } = require('node:test');
const { jsx } = require('react/jsx-runtime');
const { Document, Page, Text, renderToBuffer } = require('@react-pdf/renderer');
const MyDocument = () =>
jsx(Document, {
children: jsx(Page, {
size: 'A4',
children: jsx(Text, {
children: 'Hello world',
}),
}),
});
function removeMovingParts(buffer) {
return Buffer.from(
buffer
.toString('ascii')
.replace(/\(D:[0-9]{14}Z\)/g, '(D:20240101000000Z)')
.replace(
/\/ID \[.*\]/,
'/ID [<00000000000000000000000000000000> <00000000000000000000000000000000>]',
),
);
}
test('rendering a PDF', async () => {
const bufferPromise = renderToBuffer(jsx(MyDocument, {}));
const referenceBufferPromise = fs.readFile('../reference.pdf');
const [buffer, referenceBuffer] = await Promise.all([
bufferPromise,
referenceBufferPromise,
]);
const bufferAsciiWithIDsRemoved = removeMovingParts(buffer);
const referenceBufferAsciiWithIDsRemoved = removeMovingParts(referenceBuffer);
assert.deepStrictEqual(
bufferAsciiWithIDsRemoved,
referenceBufferAsciiWithIDsRemoved,
);
});
================================================
FILE: e2e/node-cjs/package.json
================================================
{
"name": "@react-pdf/e2e-node-cjs",
"version": "2.0.24",
"license": "MIT",
"private": true,
"type": "commonjs",
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"repository": "git@github.com:diegomura/react-pdf.git",
"scripts": {
"dev": "node --watch ./index.js",
"start": "node ./index.js"
},
"dependencies": {
"@react-pdf/renderer": "^4.3.2",
"react": "^18.2.0"
}
}
================================================
FILE: e2e/node-esm/CHANGELOG.md
================================================
# @react-pdf/e2e-node-esm
## 2.0.24
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.3.2
## 2.0.23
### Patch Changes
- Updated dependencies [[`dcc7b403`](https://github.com/diegomura/react-pdf/commit/dcc7b40313b5662b9bd16678fbc0b62eeaf65d71)]:
- @react-pdf/renderer@4.3.1
## 2.0.22
### Patch Changes
- Updated dependencies [[`01b4ff5c`](https://github.com/diegomura/react-pdf/commit/01b4ff5cb00420dd37c2f28fb95822dd18cdd982), [`f89f75c1`](https://github.com/diegomura/react-pdf/commit/f89f75c1f132ba19b54847c3ac23efec675f8d0a)]:
- @react-pdf/renderer@4.3.0
## 2.0.21
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.4
## 2.0.20
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.3
## 2.0.19
### Patch Changes
- Updated dependencies [[`226467e3`](https://github.com/diegomura/react-pdf/commit/226467e39443d3690b8f8c3298aa8278b43fbfa6)]:
- @react-pdf/renderer@4.2.2
## 2.0.18
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.1
## 2.0.17
### Patch Changes
- Updated dependencies [[`7cd71714`](https://github.com/diegomura/react-pdf/commit/7cd7171472b0f300db56b7805c5f966bf4ced6e2), [`685890bd`](https://github.com/diegomura/react-pdf/commit/685890bd841b7d2480157117fcd3cbb1334f6324)]:
- @react-pdf/renderer@4.2.0
## 2.0.16
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.6
## 2.0.15
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.5
## 2.0.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.4
## 2.0.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.3
## 2.0.12
### Patch Changes
- Updated dependencies [[`aab7d958`](https://github.com/diegomura/react-pdf/commit/aab7d95870d9073e4acb004aa0cce9cfa19b7f0e)]:
- @react-pdf/renderer@4.1.2
## 2.0.11
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.1
## 2.0.10
### Patch Changes
- Updated dependencies [[`52b2f253`](https://github.com/diegomura/react-pdf/commit/52b2f25349bee0c09399bc2e7e5e89db5e1433fd)]:
- @react-pdf/renderer@4.1.0
## 2.0.9
### Patch Changes
- Updated dependencies [[`7add014c`](https://github.com/diegomura/react-pdf/commit/7add014c6bc9cff649dd1a56fc47214888613b6b)]:
- @react-pdf/renderer@4.0.2
## 2.0.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.0.1
## 2.0.7
### Patch Changes
- Updated dependencies [[`afe4bcfe`](https://github.com/diegomura/react-pdf/commit/afe4bcfe6f4b991cf22341242fc27d169b758d47), [`70f29a04`](https://github.com/diegomura/react-pdf/commit/70f29a0407b1d56e9a7932b25c0d69132e9b4119)]:
- @react-pdf/renderer@4.0.0
## 2.0.6
### Patch Changes
- Updated dependencies [[`ed94775`](https://github.com/diegomura/react-pdf/commit/ed94775f4d44db0886ff08c71d09f446bace6392)]:
- @react-pdf/renderer@3.4.5
## 2.0.5
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.4
## 2.0.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.3
## 2.0.3
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.2
## 2.0.2
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.1
## 2.0.1
### Patch Changes
- Updated dependencies [[`fab09cc`](https://github.com/diegomura/react-pdf/commit/fab09cc9814326fdb44d2bcb7097ba9960d441d1)]:
- @react-pdf/renderer@3.4.0
================================================
FILE: e2e/node-esm/index.js
================================================
import fs from 'node:fs/promises';
import assert from 'node:assert';
import { test } from 'node:test';
import { jsx } from 'react/jsx-runtime';
import { Document, Page, Text, renderToBuffer } from '@react-pdf/renderer';
const MyDocument = () =>
jsx(Document, {
children: jsx(Page, {
size: 'A4',
children: jsx(Text, {
children: 'Hello world',
}),
}),
});
function removeMovingParts(buffer) {
return Buffer.from(
buffer
.toString('ascii')
.replace(/\(D:[0-9]{14}Z\)/g, '(D:20240101000000Z)')
.replace(
/\/ID \[.*\]/,
'/ID [<00000000000000000000000000000000> <00000000000000000000000000000000>]',
),
);
}
test('rendering a PDF', async () => {
const bufferPromise = renderToBuffer(jsx(MyDocument, {}));
const referenceBufferPromise = fs.readFile('../reference.pdf');
const [buffer, referenceBuffer] = await Promise.all([
bufferPromise,
referenceBufferPromise,
]);
const bufferAsciiWithIDsRemoved = removeMovingParts(buffer);
const referenceBufferAsciiWithIDsRemoved = removeMovingParts(referenceBuffer);
assert.deepStrictEqual(
bufferAsciiWithIDsRemoved,
referenceBufferAsciiWithIDsRemoved,
);
});
================================================
FILE: e2e/node-esm/package.json
================================================
{
"name": "@react-pdf/e2e-node-esm",
"version": "2.0.24",
"license": "MIT",
"private": true,
"type": "module",
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"repository": "git@github.com:diegomura/react-pdf.git",
"scripts": {
"dev": "node --watch ./index.js",
"start": "node ./index.js"
},
"dependencies": {
"@react-pdf/renderer": "^4.3.2",
"react": "^18.2.0"
}
}
================================================
FILE: eslint.config.ts
================================================
import { version } from 'react';
import reactPlugin from 'eslint-plugin-react';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import vitestPlugin from '@vitest/eslint-plugin';
import prettierPlugin from 'eslint-plugin-prettier';
const baseConfig = {
languageOptions: {
parser: tsParser,
sourceType: 'module',
},
plugins: {
'@typescript-eslint': tsPlugin,
},
};
const ignoreConfig = {
ignores: [
'**/dist',
'**/lib',
'**/node_modules',
'**/packages/pdfkit/**',
'**/packages/png-js/**',
'**/packages/yoga/**',
'**/packages/examples/**',
],
};
const globalsConfig = {
languageOptions: {
globals: {
atob: false,
Blob: false,
BROWSER: false,
Buffer: false,
console: false,
fetch: false,
global: false,
module: false,
process: false,
TextDecoder: false,
TextEncoder: false,
URL: false,
window: false,
},
},
};
const jsConfig = {
rules: {
'array-callback-return': ['error', { allowImplicit: true }],
'block-scoped-var': 'error',
complexity: ['off', 20],
'constructor-super': 'error',
'default-case': ['error', { commentPattern: '^no default$' }],
'default-case-last': 'error',
'dot-notation': ['error', { allowKeywords: true }],
eqeqeq: ['error', 'always', { null: 'ignore' }],
'for-direction': 'error',
'grouped-accessor-pairs': 'error',
'guard-for-in': 'error',
'getter-return': 'error',
'max-classes-per-file': ['error', 1],
'no-alert': 'error',
'no-caller': 'error',
'no-async-promise-executor': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-constructor-return': 'error',
'no-await-in-loop': 'error',
'no-console': 'warn',
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-constant-condition': 'warn',
'no-else-return': ['error', { allowElseIf: false }],
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-else-if': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-empty-static-block': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-fallthrough': 'error',
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-import-assign': 'error',
'no-invalid-regexp': 'error',
'no-implied-eval': 'error',
'no-iterator': 'error',
'no-irregular-whitespace': 'error',
'no-loss-of-precision': 'error',
'no-lone-blocks': 'error',
'no-loop-func': 'error',
'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
'no-misleading-character-class': 'error',
'no-new-native-nonconstructor': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-obj-calls': 'error',
'no-new-func': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-prototype-builtins': 'error',
'no-script-url': 'error',
'no-return-await': 'error',
'no-redeclare': 'error',
'no-return-assign': ['error', 'always'],
'no-regex-spaces': 'error',
'no-new-wrappers': 'error',
'no-self-assign': 'error',
'no-setter-return': 'error',
'no-extra-label': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-template-curly-in-string': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-this-before-super': 'error',
'no-undef': 'error',
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unsafe-optional-chaining': 'error',
'no-unused-labels': 'error',
'no-negated-in-lhs': 'off',
'no-unused-vars': ['error', { ignoreRestSiblings: true }],
'no-useless-backreference': 'error',
'no-useless-concat': 'error',
'no-useless-catch': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'no-with': 'error',
'prefer-promise-reject-errors': ['error', { allowEmptyReject: true }],
'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],
'prefer-const': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
radix: 'error',
'require-yield': 'error',
'use-isnan': 'error',
'valid-typeof': 'error',
yoda: 'error',
},
};
const reactConfig = {
settings: {
react: { version },
},
plugins: {
react: reactPlugin,
},
rules: {
'react/display-name': 'error',
'react/jsx-key': 'error',
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-target-blank': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-uses-vars': 'error',
'react/no-children-prop': 'error',
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-is-mounted': 'error',
'react/no-render-return-value': 'error',
'react/no-string-refs': 'error',
'react/no-unescaped-entities': 'error',
'react/no-unknown-property': 'error',
'react/require-render-return': 'error',
},
languageOptions: {
parserOptions: {
jsxPragma: null,
ecmaFeatures: {
jsx: true,
},
},
},
};
const vitestConfig = {
files: ['**/*.test.js', '**/*.test.ts'],
plugins: {
vitest: vitestPlugin,
},
rules: {
'vitest/expect-expect': 'error',
'vitest/no-identical-title': 'error',
'vitest/no-commented-out-tests': 'error',
'vitest/valid-title': 'error',
'vitest/valid-expect': 'error',
'vitest/valid-describe-callback': 'error',
'vitest/require-local-test-context-for-concurrent-snapshots': 'error',
'vitest/no-import-node-test': 'error',
'vitest/max-nested-describe': ['error', { max: 3 }],
},
};
const tsConfig = {
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
rules: {
'constructor-super': 'off',
'getter-return': 'off',
'no-class-assign': 'off',
'no-const-assign': 'off',
'no-dupe-args': 'off',
'no-dupe-class-members': 'off',
'no-dupe-keys': 'off',
'no-func-assign': 'off',
'no-import-assign': 'off',
'no-new-native-nonconstructor': 'off',
'no-promise-executor-return': 'error',
'no-obj-calls': 'off',
'no-redeclare': 'off',
'no-setter-return': 'off',
'no-this-before-super': 'off',
'no-undef': 'off',
'no-unreachable': 'off',
'no-unsafe-negation': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-empty-object-type': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
'@typescript-eslint/no-unsafe-function-type': 'error',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-wrapper-object-types': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
},
};
const prettierConfig = {
plugins: {
prettier: prettierPlugin,
},
rules: {
'prettier/prettier': 'error',
},
};
const config = [
baseConfig,
ignoreConfig,
globalsConfig,
jsConfig,
reactConfig,
vitestConfig,
tsConfig,
prettierConfig,
];
export default config;
================================================
FILE: lerna.json
================================================
{
"version": "independent",
"packages": ["packages/*", "packages/examples/*", "e2e/*"],
"npmClient": "yarn"
}
================================================
FILE: package.json
================================================
{
"private": true,
"name": "@react-pdf/root",
"version": "2.0.0",
"license": "MIT",
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"type": "module",
"repository": "git@github.com:diegomura/react-pdf.git",
"workspaces": [
"packages/*",
"packages/examples/*",
"e2e/*"
],
"scripts": {
"prepare": "husky",
"build": "lerna run build",
"watch": "lerna run watch --parallel",
"typecheck": "lerna run typecheck --parallel",
"prepublish": "lerna run build",
"lint": "eslint packages",
"test": "vitest",
"dev": "lerna run dev --scope @react-pdf/examples --",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "changeset publish"
},
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.0",
"@rollup/plugin-replace": "^5.0.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.2",
"@testing-library/react": "^14.0.0",
"@typescript-eslint/eslint-plugin": "^8.23.0",
"@typescript-eslint/parser": "^8.23.0",
"@typescript-eslint/utils": "^8.23.0",
"@vitejs/plugin-react": "^4.2.1",
"@vitest/eslint-plugin": "^1.1.27",
"babel-plugin-add-module-exports": "^1.0.0",
"canvas": "^2.11.2",
"chalk": "^2.4.2",
"eslint": "^9.20.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.3",
"eslint-plugin-react": "^7.37.4",
"husky": "^9.0.0",
"jest-image-snapshot": "^6.1.0",
"jiti": "^2.4.2",
"jsdom": "^23.2.0",
"lerna": "^8.0.2",
"lint-staged": "^10.5.4",
"pdfjs-dist": "3.2.146",
"prettier": "^3.2.0",
"react": "^18.2.0",
"react-16": "npm:react@^16.8.0",
"react-17": "npm:react@^17.0.0",
"react-19": "npm:react@19.0.0-rc-66855b96-20241106",
"react-19-2": "npm:react@^19.2.0",
"react-dom": "^18.2.0",
"react-dom-16": "npm:react-dom@^16.8.0",
"react-dom-17": "npm:react-dom@^17.0.0",
"react-dom-19": "npm:react-dom@19.0.0-rc-66855b96-20241106",
"react-dom-19-2": "npm:react-dom@^19.2.0",
"rimraf": "^2.6.3",
"rollup": "^4.34.6",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-ignore": "^1.0.10",
"rollup-plugin-local-resolve": "^1.0.7",
"rollup-plugin-polyfill-node": "^0.13.0",
"vitest": "^1.2.0",
"vitest-fetch-mock": "^0.2.2"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"yarn lint",
"prettier --write"
]
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/react-pdf",
"logo": "https://opencollective.com/opencollective/logo.txt"
},
"packageManager": "yarn@1.22.19"
}
================================================
FILE: packages/examples/dev.sh
================================================
#!/bin/bash
# Get the directory of the script
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Get the list of directories adjacent to the script
dirs=()
for dir in "$scriptDir"/*/ ; do
[ -d "$dir" ] && dirs+=("$(basename "$dir")")
done
# Check if any directories were found
if [ ${#dirs[@]} -eq 0 ]; then
echo "No example directories found."
exit 1
fi
if [ -n "$1" ]; then
# First argument provided
selectedDir="$1"
if [[ " ${dirs[@]} " =~ " $selectedDir " ]]; then
echo "Selected example: $selectedDir"
else
echo "Example '$selectedDir' does not exist adjacent to the script."
exit 1
fi
else
# No argument provided, prompt the user to select one
echo "Please select an example:"
select selectedDir in "${dirs[@]}"; do
if [ -n "$selectedDir" ]; then
echo "You selected: $selectedDir"
break
else
echo "Invalid selection."
fi
done
fi
# Run 'yarn dev' inside the selected directory
cd "$scriptDir/$selectedDir" || { echo "Failed to change directory to $scriptDir/$selectedDir"; exit 1; }
echo "Running 'yarn dev' in $scriptDir/$selectedDir"
yarn dev
================================================
FILE: packages/examples/next-14/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
================================================
FILE: packages/examples/next-14/CHANGELOG.md
================================================
# next-14
## 0.1.17
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.3.2
## 0.1.16
### Patch Changes
- Updated dependencies [[`dcc7b403`](https://github.com/diegomura/react-pdf/commit/dcc7b40313b5662b9bd16678fbc0b62eeaf65d71)]:
- @react-pdf/renderer@4.3.1
## 0.1.15
### Patch Changes
- Updated dependencies [[`01b4ff5c`](https://github.com/diegomura/react-pdf/commit/01b4ff5cb00420dd37c2f28fb95822dd18cdd982), [`f89f75c1`](https://github.com/diegomura/react-pdf/commit/f89f75c1f132ba19b54847c3ac23efec675f8d0a)]:
- @react-pdf/renderer@4.3.0
## 0.1.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.4
## 0.1.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.3
## 0.1.12
### Patch Changes
- Updated dependencies [[`226467e3`](https://github.com/diegomura/react-pdf/commit/226467e39443d3690b8f8c3298aa8278b43fbfa6)]:
- @react-pdf/renderer@4.2.2
## 0.1.11
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.1
## 0.1.10
### Patch Changes
- Updated dependencies [[`7cd71714`](https://github.com/diegomura/react-pdf/commit/7cd7171472b0f300db56b7805c5f966bf4ced6e2), [`685890bd`](https://github.com/diegomura/react-pdf/commit/685890bd841b7d2480157117fcd3cbb1334f6324)]:
- @react-pdf/renderer@4.2.0
## 0.1.9
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.6
## 0.1.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.5
## 0.1.7
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.4
## 0.1.6
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.3
## 0.1.5
### Patch Changes
- Updated dependencies [[`aab7d958`](https://github.com/diegomura/react-pdf/commit/aab7d95870d9073e4acb004aa0cce9cfa19b7f0e)]:
- @react-pdf/renderer@4.1.2
## 0.1.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.1
## 0.1.3
### Patch Changes
- Updated dependencies [[`52b2f253`](https://github.com/diegomura/react-pdf/commit/52b2f25349bee0c09399bc2e7e5e89db5e1433fd)]:
- @react-pdf/renderer@4.1.0
## 0.1.2
### Patch Changes
- Updated dependencies [[`7add014c`](https://github.com/diegomura/react-pdf/commit/7add014c6bc9cff649dd1a56fc47214888613b6b)]:
- @react-pdf/renderer@4.0.2
## 0.1.1
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.0.1
================================================
FILE: packages/examples/next-14/README.md
================================================
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
================================================
FILE: packages/examples/next-14/app/globals.css
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;
================================================
FILE: packages/examples/next-14/app/layout.js
================================================
import './globals.css';
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};
export default function RootLayout({ children }) {
return (
<html lang="en">
<body className="antialiased">{children}</body>
</html>
);
}
================================================
FILE: packages/examples/next-14/app/page.js
================================================
'use client';
import {
Document,
Page,
PDFViewer,
PDFDownloadLink,
Text,
} from '@react-pdf/renderer';
export default function Home() {
const doc = (
<Document>
<Page
style={{
padding: 40,
paddingTop: 32,
}}
>
<Text>Hello world from client</Text>
</Page>
</Document>
);
return (
<div>
<PDFViewer className="w-full h-svh">{doc}</PDFViewer>
<PDFDownloadLink document={doc}>Download</PDFDownloadLink>
</div>
);
}
================================================
FILE: packages/examples/next-14/jsconfig.json
================================================
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
================================================
FILE: packages/examples/next-14/next.config.mjs
================================================
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;
================================================
FILE: packages/examples/next-14/package.json
================================================
{
"name": "next-14",
"version": "0.1.17",
"private": true,
"scripts": {
"dev": "next dev",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@react-pdf/renderer": "^4.3.2",
"react": "^18",
"react-dom": "^18",
"next": "15.4.10"
},
"devDependencies": {
"postcss": "^8",
"tailwindcss": "^3.4.17"
}
}
================================================
FILE: packages/examples/next-14/postcss.config.mjs
================================================
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};
export default config;
================================================
FILE: packages/examples/next-14/tailwind.config.js
================================================
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
},
},
},
plugins: [],
};
================================================
FILE: packages/examples/next-15/.gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts
================================================
FILE: packages/examples/next-15/CHANGELOG.md
================================================
# next-15
## 0.1.17
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.3.2
## 0.1.16
### Patch Changes
- Updated dependencies [[`dcc7b403`](https://github.com/diegomura/react-pdf/commit/dcc7b40313b5662b9bd16678fbc0b62eeaf65d71)]:
- @react-pdf/renderer@4.3.1
## 0.1.15
### Patch Changes
- Updated dependencies [[`01b4ff5c`](https://github.com/diegomura/react-pdf/commit/01b4ff5cb00420dd37c2f28fb95822dd18cdd982), [`f89f75c1`](https://github.com/diegomura/react-pdf/commit/f89f75c1f132ba19b54847c3ac23efec675f8d0a)]:
- @react-pdf/renderer@4.3.0
## 0.1.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.4
## 0.1.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.3
## 0.1.12
### Patch Changes
- Updated dependencies [[`226467e3`](https://github.com/diegomura/react-pdf/commit/226467e39443d3690b8f8c3298aa8278b43fbfa6)]:
- @react-pdf/renderer@4.2.2
## 0.1.11
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.1
## 0.1.10
### Patch Changes
- Updated dependencies [[`7cd71714`](https://github.com/diegomura/react-pdf/commit/7cd7171472b0f300db56b7805c5f966bf4ced6e2), [`685890bd`](https://github.com/diegomura/react-pdf/commit/685890bd841b7d2480157117fcd3cbb1334f6324)]:
- @react-pdf/renderer@4.2.0
## 0.1.9
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.6
## 0.1.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.5
## 0.1.7
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.4
## 0.1.6
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.3
## 0.1.5
### Patch Changes
- Updated dependencies [[`aab7d958`](https://github.com/diegomura/react-pdf/commit/aab7d95870d9073e4acb004aa0cce9cfa19b7f0e)]:
- @react-pdf/renderer@4.1.2
## 0.1.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.1
## 0.1.3
### Patch Changes
- Updated dependencies [[`52b2f253`](https://github.com/diegomura/react-pdf/commit/52b2f25349bee0c09399bc2e7e5e89db5e1433fd)]:
- @react-pdf/renderer@4.1.0
## 0.1.2
### Patch Changes
- Updated dependencies [[`7add014c`](https://github.com/diegomura/react-pdf/commit/7add014c6bc9cff649dd1a56fc47214888613b6b)]:
- @react-pdf/renderer@4.0.2
## 0.1.1
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.0.1
================================================
FILE: packages/examples/next-15/README.md
================================================
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
## Learn More
To learn more about Next.js, take a look at the following resources:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
## Deploy on Vercel
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
================================================
FILE: packages/examples/next-15/app/globals.css
================================================
@tailwind base;
@tailwind components;
@tailwind utilities;
================================================
FILE: packages/examples/next-15/app/layout.js
================================================
import './globals.css';
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};
export default function RootLayout({ children }) {
return (
<html lang="en">
<body className="antialiased">{children}</body>
</html>
);
}
================================================
FILE: packages/examples/next-15/app/page.js
================================================
'use client';
import {
Document,
Page,
PDFViewer,
PDFDownloadLink,
Text,
} from '@react-pdf/renderer';
export default function Home() {
const doc = (
<Document>
<Page
style={{
padding: 40,
paddingTop: 32,
}}
>
<Text>Hello world from client</Text>
</Page>
</Document>
);
return (
<div>
<PDFViewer className="w-full h-svh">{doc}</PDFViewer>
<PDFDownloadLink document={doc}>Download</PDFDownloadLink>
</div>
);
}
================================================
FILE: packages/examples/next-15/jsconfig.json
================================================
{
"compilerOptions": {
"paths": {
"@/*": ["./*"]
}
}
}
================================================
FILE: packages/examples/next-15/next.config.mjs
================================================
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;
================================================
FILE: packages/examples/next-15/package.json
================================================
{
"name": "next-15",
"version": "0.1.17",
"private": true,
"scripts": {
"dev": "next dev",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@react-pdf/renderer": "^4.3.2",
"react": "19.1.0",
"react-dom": "19.1.0",
"next": "15.4.10"
},
"devDependencies": {
"postcss": "^8",
"tailwindcss": "^3.4.17"
}
}
================================================
FILE: packages/examples/next-15/postcss.config.mjs
================================================
/** @type {import('postcss-load-config').Config} */
const config = {
plugins: {
tailwindcss: {},
},
};
export default config;
================================================
FILE: packages/examples/next-15/tailwind.config.js
================================================
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
colors: {
background: 'var(--background)',
foreground: 'var(--foreground)',
},
},
},
plugins: [],
};
================================================
FILE: packages/examples/package.json
================================================
{
"name": "@react-pdf/examples",
"version": "0.0.0",
"license": "MIT",
"private": true,
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"repository": "git@github.com:diegomura/react-pdf.git",
"scripts": {
"dev": "./dev.sh"
}
}
================================================
FILE: packages/examples/vite/.gitignore
================================================
lib
node_modules
================================================
FILE: packages/examples/vite/CHANGELOG.md
================================================
# @react-pdf/examples
## 3.3.20
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.3.2
## 3.3.19
### Patch Changes
- Updated dependencies [[`dcc7b403`](https://github.com/diegomura/react-pdf/commit/dcc7b40313b5662b9bd16678fbc0b62eeaf65d71)]:
- @react-pdf/renderer@4.3.1
## 3.3.18
### Patch Changes
- Updated dependencies [[`01b4ff5c`](https://github.com/diegomura/react-pdf/commit/01b4ff5cb00420dd37c2f28fb95822dd18cdd982), [`f89f75c1`](https://github.com/diegomura/react-pdf/commit/f89f75c1f132ba19b54847c3ac23efec675f8d0a)]:
- @react-pdf/renderer@4.3.0
## 3.3.17
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.4
## 3.3.16
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.3
## 3.3.15
### Patch Changes
- Updated dependencies [[`226467e3`](https://github.com/diegomura/react-pdf/commit/226467e39443d3690b8f8c3298aa8278b43fbfa6)]:
- @react-pdf/renderer@4.2.2
## 3.3.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.2.1
## 3.3.13
### Patch Changes
- Updated dependencies [[`7cd71714`](https://github.com/diegomura/react-pdf/commit/7cd7171472b0f300db56b7805c5f966bf4ced6e2), [`685890bd`](https://github.com/diegomura/react-pdf/commit/685890bd841b7d2480157117fcd3cbb1334f6324)]:
- @react-pdf/renderer@4.2.0
## 3.3.12
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.6
## 3.3.11
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.5
## 3.3.10
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.4
## 3.3.9
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.3
## 3.3.8
### Patch Changes
- Updated dependencies [[`aab7d958`](https://github.com/diegomura/react-pdf/commit/aab7d95870d9073e4acb004aa0cce9cfa19b7f0e)]:
- @react-pdf/renderer@4.1.2
## 3.3.7
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.1.1
## 3.3.6
### Patch Changes
- Updated dependencies [[`52b2f253`](https://github.com/diegomura/react-pdf/commit/52b2f25349bee0c09399bc2e7e5e89db5e1433fd)]:
- @react-pdf/renderer@4.1.0
## 3.3.5
### Patch Changes
- Updated dependencies [[`7add014c`](https://github.com/diegomura/react-pdf/commit/7add014c6bc9cff649dd1a56fc47214888613b6b)]:
- @react-pdf/renderer@4.0.2
## 3.3.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@4.0.1
## 3.3.3
### Patch Changes
- Updated dependencies [[`afe4bcfe`](https://github.com/diegomura/react-pdf/commit/afe4bcfe6f4b991cf22341242fc27d169b758d47), [`70f29a04`](https://github.com/diegomura/react-pdf/commit/70f29a0407b1d56e9a7932b25c0d69132e9b4119)]:
- @react-pdf/renderer@4.0.0
## 3.3.2
### Patch Changes
- [#2747](https://github.com/diegomura/react-pdf/pull/2747) [`5af35ec`](https://github.com/diegomura/react-pdf/commit/5af35ec9743cc0d7bf75f5ca789627517ff35816) Thanks [@andrew-spare](https://github.com/andrew-spare)! - fix: font selection regression
- Updated dependencies [[`ed94775`](https://github.com/diegomura/react-pdf/commit/ed94775f4d44db0886ff08c71d09f446bace6392)]:
- @react-pdf/renderer@3.4.5
## 3.3.1
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.4
## 3.3.0
### Minor Changes
- [#2640](https://github.com/diegomura/react-pdf/pull/2640) [`67c265a`](https://github.com/diegomura/react-pdf/commit/67c265a7e39cc0baa319f49137219677904695e6) Thanks [@nikgraf](https://github.com/nikgraf)! - Add support for fontFamily fallbacks e.g. fontFamily: ['Roboto', 'NotoSansArabic']
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.3
## 3.2.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.2
## 3.2.12
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.4.1
## 3.2.11
### Patch Changes
- Updated dependencies [[`fab09cc`](https://github.com/diegomura/react-pdf/commit/fab09cc9814326fdb44d2bcb7097ba9960d441d1)]:
- @react-pdf/renderer@3.4.0
## 3.2.10
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.3.8
## 3.2.9
### Patch Changes
- Updated dependencies [[`f7505ed`](https://github.com/diegomura/react-pdf/commit/f7505ed453a1a0ae960d0e5e4a1d155803861b71)]:
- @react-pdf/renderer@3.3.7
## 3.2.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.3.6
## 3.2.7
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.3.5
## 3.2.6
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.3.4
## 3.2.5
### Patch Changes
- Updated dependencies [[`b5380a1`](https://github.com/diegomura/react-pdf/commit/b5380a1a0a7397b4111d68ce97b4acb702d34d51)]:
- @react-pdf/renderer@3.3.3
## 3.2.4
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.3.2
## 3.2.3
### Patch Changes
- [#2529](https://github.com/diegomura/react-pdf/pull/2529) [`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8) Thanks [@diegomura](https://github.com/diegomura)! - fix: jpeg exif orientation rendering
- Updated dependencies [[`a35b1ba`](https://github.com/diegomura/react-pdf/commit/a35b1ba18d293df51293600d8d56015094d222d8)]:
- @react-pdf/renderer@3.3.1
## 3.2.2
### Patch Changes
- [#2518](https://github.com/diegomura/react-pdf/pull/2518) [`3c62070`](https://github.com/diegomura/react-pdf/commit/3c6207035d2f02109bb2b5ef8804febc5a05b488) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid prop (style) in Resume example
* [#2521](https://github.com/diegomura/react-pdf/pull/2521) [`214207b`](https://github.com/diegomura/react-pdf/commit/214207b62bc8061a46a7cb220901e193d327effe) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid display property in objectFit example
- [#2517](https://github.com/diegomura/react-pdf/pull/2517) [`bc0d4f4`](https://github.com/diegomura/react-pdf/commit/bc0d4f42fe5d8b8bd2fb560b753041fbf013ab33) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Fix invalid props (xmlns, id) in SVG example
- Updated dependencies [[`64f7bba`](https://github.com/diegomura/react-pdf/commit/64f7bba0d840d17188e50086169c84c415abd8d5), [`e817223`](https://github.com/diegomura/react-pdf/commit/e8172231d07d10ece4ca960641f9ee52c5d4660d), [`cf73180`](https://github.com/diegomura/react-pdf/commit/cf7318069e63170e160a36602359fc8cbc3386c2), [`0f5c43f`](https://github.com/diegomura/react-pdf/commit/0f5c43fa6f3c0b53c067200cc1ac21e651504760), [`66a40b2`](https://github.com/diegomura/react-pdf/commit/66a40b2e41cefe11f1ef8d467ba449a8861adb69)]:
- @react-pdf/renderer@3.3.0
## 3.2.1
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.2.1
## 3.2.0
### Minor Changes
- [#2409](https://github.com/diegomura/react-pdf/pull/2409) [`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37) Thanks [@wojtekmaj](https://github.com/wojtekmaj)! - Add support for native ESM
* [#2496](https://github.com/diegomura/react-pdf/pull/2496) [`c8fe2c8`](https://github.com/diegomura/react-pdf/commit/c8fe2c86639cb8e44f26f78e62fc67379a8e3ceb) Thanks [@diegomura](https://github.com/diegomura)! - fix: copyright and registered symbol rendering
### Patch Changes
- Updated dependencies [[`b6a14fd`](https://github.com/diegomura/react-pdf/commit/b6a14fd160fab26a49f798e5294b0e361e67fe37)]:
- @react-pdf/renderer@3.2.0
## 3.1.0
### Minor Changes
- [#2491](https://github.com/diegomura/react-pdf/pull/2491) [`ed8524f`](https://github.com/diegomura/react-pdf/commit/ed8524f867f71fc8407faeb74edc4574e99a1137) Thanks [@diegomura](https://github.com/diegomura)! - feat: add minPresenceAhead example
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.17
## 3.0.0
### Major Changes
- [#2487](https://github.com/diegomura/react-pdf/pull/2487) [`3f31046`](https://github.com/diegomura/react-pdf/commit/3f310460dcadb7bd65adeab0309812aa757cde29) Thanks [@diegomura](https://github.com/diegomura)! - add dev script
### Patch Changes
- [#2479](https://github.com/diegomura/react-pdf/pull/2479) [`45b2bd3`](https://github.com/diegomura/react-pdf/commit/45b2bd37037c605727ad5783f2f2a438dc19cac4) Thanks [@diegomura](https://github.com/diegomura)! - fix linting
- Updated dependencies [[`8654d00`](https://github.com/diegomura/react-pdf/commit/8654d003023dd0899cddfc2ea2f5a552e01cf570)]:
- @react-pdf/renderer@3.1.16
## 2.0.14
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.15
## 2.0.13
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.14
## 2.0.12
### Patch Changes
- Updated dependencies [[`3b5e1c7`](https://github.com/diegomura/react-pdf/commit/3b5e1c7c71a0f830ae2b70da8aac2b2bd5015ca3)]:
- @react-pdf/renderer@3.1.13
## 2.0.11
### Patch Changes
- Updated dependencies [[`6d408c8`](https://github.com/diegomura/react-pdf/commit/6d408c838b1aa9bea0db63bf36b2a6932a20404c)]:
- @react-pdf/renderer@3.1.12
## 2.0.10
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.11
## 2.0.9
### Patch Changes
- Updated dependencies [[`113de53`](https://github.com/diegomura/react-pdf/commit/113de537b0fa9bae06a69e7c8daa988fe319fc6a), [`d6018d5`](https://github.com/diegomura/react-pdf/commit/d6018d5a80492270ff5f5b4c00e694f7dc1cd93f)]:
- @react-pdf/renderer@3.1.10
## 2.0.8
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.9
## 2.0.7
### Patch Changes
- Updated dependencies [[`5832ff2`](https://github.com/diegomura/react-pdf/commit/5832ff20e1ce4a0e49cf5249dcdf4b304eab04c6), [`37bfa1b`](https://github.com/diegomura/react-pdf/commit/37bfa1ba26386d1725f42ba5e108d8c72aa71e85)]:
- @react-pdf/renderer@3.1.8
## 2.0.6
### Patch Changes
- Updated dependencies [[`b194b61`](https://github.com/diegomura/react-pdf/commit/b194b619b19a7683b64d47eaa2573635e6884e8d)]:
- @react-pdf/renderer@3.1.7
## 2.0.5
### Patch Changes
- Updated dependencies [[`9a5e0be`](https://github.com/diegomura/react-pdf/commit/9a5e0befb89756db07ce053192a136df9d4ba905), [`f6667e7`](https://github.com/diegomura/react-pdf/commit/f6667e75449c241d02f9f44fb717a71443c555c1)]:
- @react-pdf/renderer@3.1.6
## 2.0.4
### Patch Changes
- Updated dependencies [[`f4d2b68`](https://github.com/diegomura/react-pdf/commit/f4d2b68765d146e4718140f65eeceb7e69e2cfee), [`75150ca`](https://github.com/diegomura/react-pdf/commit/75150ca137b709fcab6e7cefee9dfac6b48d5aaa)]:
- @react-pdf/renderer@3.1.5
## 2.0.3
### Patch Changes
- Updated dependencies []:
- @react-pdf/renderer@3.1.4
## 2.0.2
### Patch Changes
- Updated dependencies [[`a5a933c`](https://github.com/diegomura/react-pdf/commit/a5a933c9733e4c77338ef76a2b3545b84a646a81), [`d1f3d5b`](https://github.com/diegomura/react-pdf/commit/d1f3d5b9b4103705e95e2160347ee253d842ed5d), [`7eefc33`](https://github.com/diegomura/react-pdf/commit/7eefc3323390c59bf6d4f923749526831572ef1a), [`3b054b7`](https://github.com/diegomura/react-pdf/commit/3b054b711f5dc0b1c4fd29feaf85b430baad2663), [`9996158`](https://github.com/diegomura/react-pdf/commit/9996158636edf2118c4a6dcce08a00408b982993)]:
- @react-pdf/renderer@3.0.0
## 2.0.1
### Patch Changes
- [#1827](https://github.com/diegomura/react-pdf/pull/1827) [`7c1d373`](https://github.com/diegomura/react-pdf/commit/7c1d373a06b04369e762069be4b96d4e40371ecc) Thanks [@diegomura](https://github.com/diegomura)! - refactor: remove ramda from layout package
- Updated dependencies [[`6c799ec`](https://github.com/diegomura/react-pdf/commit/6c799ec1bbe17106df6db109df4a62c70e39bd24)]:
- @react-pdf/renderer@2.1.2
================================================
FILE: packages/examples/vite/README.md
================================================
<p align="center">
<img src="https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d081a8b9.png" height="280px">
</p>
> React-pdf examples
## Catalog
<table>
<tbody>
<tr>
<td align="center" valign="top">
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/text/">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/packages/examples/src/text/thumb.png?raw=true">
</a>
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/text/">Text</a>
</td>
<td align="center" valign="top">
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/resume/">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/packages/examples/src/resume/thumb.png?raw=true">
</a>
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/resume/">Resume</a>
</td>
<td align="center" valign="top">
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/fractals/">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/packages/examples/src/fractals/thumb.png?raw=true">
</a>
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/fractals/">Fractals</a>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td align="center" valign="top">
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/knobs/">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/packages/examples/src/knobs/thumb.png?raw=true">
</a>
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/knobs/">Knobs</a>
</td>
<td align="center" valign="top">
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/pageWrap/">
<img width="150" height="150" src="https://github.com/diegomura/react-pdf/blob/master/packages/examples/src/pageWrap/thumb.png?raw=true">
</a>
<br>
<a href="https://github.com/diegomura/react-pdf/tree/master/packages/examples/src/pageWrap/">Page wrap</a>
</td>
</tr>
</tbody>
</table>
## License
MIT © [Diego Muracciole](http://github.com/diegomura)
================================================
FILE: packages/examples/vite/declarations.d.ts
================================================
declare module '*.jpg' {
const src: string;
export default src;
}
declare module '*.jpeg' {
const src: string;
export default src;
}
declare module '*.png' {
const src: string;
export default src;
}
declare module '*.ttf' {
const src: string;
export default src;
}
================================================
FILE: packages/examples/vite/package.json
================================================
{
"name": "@react-pdf/vite-example",
"version": "3.3.20",
"license": "MIT",
"private": true,
"author": "Diego Muracciole <diegomuracciole@gmail.com>",
"homepage": "https://github.com/diegomura/react-pdf#readme",
"repository": "git@github.com:diegomura/react-pdf.git",
"scripts": {
"dev": "vite ./src --open",
"build:site": "vite build ./src"
},
"dependencies": {
"@react-pdf/renderer": "^4.3.2"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"devDependencies": {
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.17",
"vite": "^5.0.11"
}
}
================================================
FILE: packages/examples/vite/postcss.config.js
================================================
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
================================================
FILE: packages/examples/vite/src/examples/duplicated-images/index.tsx
================================================
import React from 'react';
import { Document, Page, Image, StyleSheet } from '@react-pdf/renderer';
import Quijote1 from '../../../public/quijote1.jpg';
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 65,
paddingHorizontal: 35,
},
image: {
marginVertical: 15,
marginHorizontal: 0,
width: 520,
height: 200,
backgroundColor: 'red',
objectFit: 'fill',
objectPositionX: 'center',
objectPositionY: 'center',
borderWith: 2,
padding: 2,
borderColor: 'blue',
borderStyle: 'solid',
},
image2: {
marginVertical: 15,
marginHorizontal: 0,
width: 300,
backgroundColor: 'green',
objectFit: 'fill',
objectPositionX: 'center',
objectPositionY: 'center',
borderWith: 2,
padding: 2,
borderColor: 'blue',
borderStyle: 'solid',
},
});
const MyDoc = () => {
return (
<Page style={styles.body}>
<Image style={styles.image} src={Quijote1} />
<Image style={styles.image2} src={Quijote1} />
<Image style={styles.image} src={Quijote1} />
<Image style={styles.image2} src={Quijote1} />
</Page>
);
};
const DuplicatedImages = () => {
return (
<Document>
<MyDoc />
</Document>
);
};
export default {
id: 'duplicated-images',
name: 'Duplicated Images',
description: '',
Document: DuplicatedImages,
};
================================================
FILE: packages/examples/vite/src/examples/ellipsis/index.tsx
================================================
import React from 'react';
import {
Document,
Page,
Text,
View,
StyleSheet,
Font,
} from '@react-pdf/renderer';
import RobotoFont from '../../../public/Roboto-Regular.ttf';
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 65,
paddingHorizontal: 35,
},
text: {
fontSize: 15,
maxLines: 1,
fontColor: '#000000',
textOverflow: 'ellipsis',
fontFamily: 'Roboto',
},
});
Font.register({
family: 'Roboto',
fonts: [
{
src: RobotoFont,
fontWeight: 400,
},
],
});
const MyDoc = () => {
return (
<Page style={styles.body}>
<View style={{ width: 70 }}>
<Text style={styles.text}>And here here</Text>
</View>
</Page>
);
};
const Ellipsis = () => {
return (
<Document>
<MyDoc />
</Document>
);
};
export default {
id: 'ellipsis',
name: 'Ellipsis',
description: '',
Document: Ellipsis,
};
================================================
FILE: packages/examples/vite/src/examples/emoji/index.tsx
================================================
import React from 'react';
import {
Document,
Page,
View,
Text,
Font,
StyleSheet,
} from '@react-pdf/renderer';
const styles = StyleSheet.create({
container: {
height: 700,
marginVertical: 70,
marginHorizontal: '10%',
},
text: {
fontSize: 100,
textAlign: 'center',
},
});
Font.registerEmojiSource({
format: 'png',
url: 'https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/',
});
const Emoji = () => (
<Document>
<Page>
<View style={styles.container}>
<Text style={styles.text}>😀💩👻🙈</Text>
</View>
</Page>
</Document>
);
export default {
id: 'emoji',
name: 'Emoji',
description: '',
Document: Emoji,
};
================================================
FILE: packages/examples/vite/src/examples/font-family-fallback/index.tsx
================================================
import React from 'react';
import { Document, Page, Text, StyleSheet, Font } from '@react-pdf/renderer';
import RobotoFont from '../../../public/Roboto-Regular.ttf';
import RobotoBoldFont from '../../../public/Roboto-Bold.ttf';
import RobotItalicFont from '../../../public/Roboto-Italic.ttf';
import NotoSansArabicFont from '../../../public/NotoSansArabic-Regular.ttf';
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 45,
paddingHorizontal: 35,
position: 'relative',
},
regular: {
fontFamily: ['Roboto', 'NotoSansArabic'],
fontSize: '14',
fontWeight: 900,
},
default: {
fontFamily: ['Courier-Bold', 'NotoSansArabic'],
fontSize: '14',
},
});
Font.register({
family: 'Roboto',
fonts: [
{
src: RobotoFont,
fontStyle: 'normal',
fontWeight: 'normal',
},
{
src: RobotItalicFont,
fontStyle: 'italic',
fontWeight: 'normal',
},
{
src: RobotoBoldFont,
fontStyle: 'normal',
fontWeight: 'bold',
},
],
});
Font.register({
family: 'NotoSansArabic',
fonts: [
{
src: NotoSansArabicFont,
fontWeight: 400,
},
],
});
const MyDoc = () => {
return (
<Page style={styles.body}>
<Text style={{ fontFamily: 'Courier', marginBottom: '20px' }}>
This font is default Courier
</Text>
<Text style={{ fontSize: 10 }}>
The following is partially Roboto and Noto Sans Arabic
</Text>
<Text style={[styles.regular, { marginBottom: '20px' }]}>
Roboto / امتحان
</Text>
<Text style={{ fontSize: 10 }}>
The following is partially Courier-Bold and Noto Sans Arabic
</Text>
<Text style={[styles.default, { marginBottom: '20px' }]}>
Courier-Bold / امتحان
</Text>
<Text style={{ fontSize: 10 }}>
The following are multiple font families, weights, and styles all on the
same line
</Text>
<Text style={{ fontFamily: 'Roboto' }}>
Roboto Normal{' / '}
<Text style={{ fontWeight: 'bold' }}>Roboto Bold</Text>
{' / '}
<Text style={{ fontStyle: 'italic' }}>Roboto Italic</Text>
{' / '}
<Text style={{ fontFamily: 'Courier' }}>Courier</Text>
</Text>
</Page>
);
};
const FontFamilyFallback = () => {
return (
<Document>
<MyDoc />
</Document>
);
};
export default {
id: 'font-family-fallback',
name: 'Font Family Fallback',
description: '',
Document: FontFamilyFallback,
};
================================================
FILE: packages/examples/vite/src/examples/font-weight/index.tsx
================================================
import React from 'react';
import { Document, Page, Text, StyleSheet, Font } from '@react-pdf/renderer';
import RobotoFont from '../../../public/Roboto-Regular.ttf';
import RobotoFontMedium from '../../../public/Roboto-Medium.ttf';
import RobotoFontBold from '../../../public/Roboto-Bold.ttf';
import RobotoFontBlack from '../../../public/Roboto-Black.ttf';
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 45,
paddingHorizontal: 35,
position: 'relative',
},
regular: {
fontFamily: 'Roboto',
fontWeight: 400,
},
medium: {
fontFamily: 'Roboto',
fontWeight: 500,
},
bold: {
fontWeight: 600,
fontFamily: 'Roboto',
},
black: {
fontWeight: 900,
fontFamily: 'Roboto',
},
});
Font.register({
family: 'Roboto',
fonts: [
{
src: RobotoFont,
fontWeight: 400,
},
{
src: RobotoFontMedium,
fontWeight: 500,
},
{
src: RobotoFontBold,
fontWeight: 700,
},
{
src: RobotoFontBlack,
fontWeight: 900,
},
],
});
const MyDoc = () => {
return (
<Page style={styles.body}>
<Text style={styles.regular}>Regular text</Text>
<Text style={styles.medium}>Medium text</Text>
<Text style={styles.bold}>Bold text</Text>
<Text style={styles.black}>Black text</Text>
</Page>
);
};
const FontWeight = () => {
return (
<Document>
<MyDoc />
</Document>
);
};
export default {
id: 'font-weight',
name: 'Font Weight',
description: '',
Document: FontWeight,
};
================================================
FILE: packages/examples/vite/src/examples/forms/index.tsx
================================================
import React from 'react';
import {
Document,
Page,
View,
Text,
Checkbox,
FieldSet,
TextInput,
Select,
List,
StyleSheet,
} from '@react-pdf/renderer';
const styles = StyleSheet.create({
fieldset: {
flexDirection: 'column',
backgroundColor: 'rgba(182,28,28,0.62)',
width: '50%',
marginBottom: 50,
},
});
const MyDoc = () => {
return (
<Page style={{ alignItems: 'center', justifyContent: 'center' }}>
<FieldSet name="user-info" style={styles.fieldset}>
<Text>TextInput</Text>
<TextInput
name="username"
value="foo"
align="center"
style={{ height: '50px' }}
/>
{/* Nested works as well */}
<View>
<Text>TextInput</Text>
<TextInput
name="password"
value="bar"
align="center"
style={{ height: '50px' }}
password
/>
</View>
<Text>Checkbox (not checked)</Text>
<Checkbox name="checkbox-default" style={{ height: '20px' }} />
<Text>Checkbox (checked)</Text>
<Checkbox name="checkbox-checked" checked style={{ height: '20px' }} />
<Text>Select</Text>
<Select
name="combo"
select={['', 'option 1', 'option 2']}
value=""
defaultValue=""
style={{ height: '20px' }}
/>
<Text>List</Text>
<List
name="list"
select={['', 'option 1', 'option 2']}
value=""
defaultValue=""
style={{ height: '50px' }}
/>
</FieldSet>
<FieldSet name="user-details" style={styles.fieldset}>
<Text>TextInput (multiline)</Text>
<TextInput
name="details"
value="hello"
align="center"
multiline
style={{ fontSize: 8, height: '100px' }}
/>
</FieldSet>
<View style={styles.fieldset}>
<Text>TextInput (no FieldSet)</Text>
<TextInput
name="textinput-no-fieldset"
value="no fieldset"
align="center"
style={{ height: '50px' }}
/>
<Text>Checkbox (checked, no FieldSet)</Text>
<Checkbox
name="checkbox-no-fieldset"
checked
style={{ height: '20px' }}
/>
</View>
</Page>
);
};
const Forms = () => {
return (
<Document>
<MyDoc />
</Document>
);
};
export default {
id: 'forms',
name: 'Forms',
description: '',
Document: Forms,
};
================================================
FILE: packages/examples/vite/src/examples/fractals/Fractal.tsx
================================================
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
const palette = [
'#781c81',
'#521b80',
'#442f8b',
'#3f4c9f',
'#4069b4',
'#4582c1',
'#4e96bd',
'#5aa6a9',
'#68b090',
'#7ab878',
'#8dbc64',
'#a2be56',
'#b7bd4b',
'#c9b843',
'#d8ae3d',
'#e29e37',
'#e78632',
'#e6672d',
'#e14427',
'#d92120',
];
const styles = StyleSheet.create({
row: {
flexGrow: 1,
width: '100%',
flexDirection: 'row',
},
column: {
flexGrow: 1,
height: '100%',
flexDirection: 'column',
},
text: {
margin: 10,
fontSize: 10,
color: 'white',
},
});
const toggle = (direction) => (direction === 'column' ? 'row' : 'column');
const Fractal = ({ steps, direction = 'column' }) => {
if (steps === 0) {
return null;
}
const fractalStyle = {
flexGrow: 1,
minWidth: 40,
minHeight: 40,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: palette[steps % palette.length],
};
return (
<View style={styles[direction]}>
<Fractal direction={toggle(direction)} steps={steps - 1} />
<View style={fractalStyle}>
<Text style={styles.text}>{steps}</Text>
</View>
</View>
);
};
export default Fractal;
================================================
FILE: packages/examples/vite/src/examples/fractals/index.tsx
================================================
import React from 'react';
import { Page, Document } from '@react-pdf/renderer';
import Fractal from './Fractal';
const Fractals = () => (
<Document>
<Page size="A4">
<Fractal steps={18} />
</Page>
<Page orientation="landscape" size="A4">
<Fractal steps={14} />
</Page>
<Page size="B4">
<Fractal steps={10} />
</Page>
</Document>
);
export default {
id: 'fractals',
name: 'Fractals',
description: '',
Document: Fractals,
};
================================================
FILE: packages/examples/vite/src/examples/go-to/index.tsx
================================================
import React from 'react';
import { Page, Document, Link, View, Image } from '@react-pdf/renderer';
const GoTo = () => (
<Document>
<Page size="A4">
<Link href="#myDest">Link to Image</Link>
</Page>
<Page size="A4">
<View style={{ height: 300, backgroundColor: 'black' }} />
<Image id="myDest" src="https://react-pdf.org/images/logo.png" />
</Page>
</Document>
);
export default {
id: 'go-to',
name: 'Go To',
description: '',
Document: GoTo,
};
================================================
FILE: packages/examples/vite/src/examples/image-stress-test/index.tsx
================================================
import React from 'react';
import { Document, Page, Image } from '@react-pdf/renderer';
const IMAGES = [
'https://images.unsplash.com/photo-1726557116827-5f2a95d57cab?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726669251120-46ff8c7ce9a3?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726706805887-0ac0e0d3a721?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726527612459-54b061d9c48d?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726533815259-8fe320ac2493?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726392660865-cbf2dc1459b6?q=80&w=3475&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726533862204-8110e6193fe9?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726688205209-c80317c116d3?q=80&w=3493&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726486896376-4d1340e2f672?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725727532120-8b2d88f47fe3?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726121678240-9126d5017990?q=80&w=3558&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726408093361-238693a8d51d?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724279797190-8371a9939494?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726090102306-49df28adaf0f?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1723877896976-8eb1cc6f07b1?q=80&w=2821&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725817901136-70a686d60386?q=80&w=3428&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726247419938-a8980d9fa429?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726092707889-c4ef049d22df?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726436877670-020a158bef47?q=80&w=3542&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725610588109-71d0def86e19?q=80&w=3500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726182916337-38dca644bc65?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725610588095-f117c0e2a921?q=80&w=3500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726138400966-63461367804d?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726182886720-9bcfa08da27a?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725714356329-f56f6054f169?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726182875049-a8283fed88da?w=800&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8MjU3fHx8ZW58MHx8fHx8',
'https://images.unsplash.com/photo-1725882393508-6652bd21b22c?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726059968922-0396248fdaea?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725652800358-ae3a752cfb68?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726044781679-7c3f20a185ec?q=80&w=3329&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725715443838-1574b8eb1c3a?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725714835081-118a2b0456b2?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725961476494-efa87ae3106a?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725714834280-0c7584637d06?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1726041453467-5fa7dce0251d?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725733802754-c2a87bda47b2?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725610588086-b9e38da987f7?q=80&w=3500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725663656850-7bc515816fcd?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725900737080-54b5a571b38c?q=80&w=3474&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1709141425206-f5cdeab3e718?q=80&w=3301&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725922638181-3dbab8df0f95?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725864832531-f50f4639dd00?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725961475845-a656bc03c758?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1723662887372-b6f42b6ccd50?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725493280276-658ff7d29fd3?q=80&w=3542&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725832062946-2ec9aae5c4e2?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725638265979-4ff4b828ed5c?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725006705487-36dd870acb7a?q=80&w=3304&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725610588145-a508e5cfe90b?q=80&w=3500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725610588149-adc351ad606d?q=80&w=3500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725615357444-6123528686cf?q=80&w=3538&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724589613596-e269be5c0849?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725113114049-31121918636c?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725565175662-3618048d8be2?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1723039914210-a6f13a6931af?q=80&w=3542&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725492114409-01a24b173dbe?q=80&w=3000&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725133306731-fd82b613300f?q=80&w=3542&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725493280155-e8f61af1b65b?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724582586529-62622e50c0b3?q=80&w=3328&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725493279974-ab7bc4e537c8?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725468697616-e35f25d5b0c4?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725449670931-b53a7cb689b9?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724123301969-22859c2a3823?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724437208913-3b82b15fc078?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724699174715-ac3751fe8995?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725053864071-f37ebb5a9d22?q=80&w=3473&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725042893312-5ec0dea9e369?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725072730410-51ca1348c521?w=800&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NjQ1fHx8ZW58MHx8fHx8',
'https://images.unsplash.com/photo-1724525647096-116d4bacbd5f?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724596314963-c71d1e58204d?q=80&w=3328&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725113160838-9efa2a25aa0b?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725267385461-cab515fc1bbe?w=800&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NjY5fHx8ZW58MHx8fHx8',
'https://images.unsplash.com/photo-1725067807346-7340abf76b0d?q=80&w=3536&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725181959662-af4acf689235?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724591634731-5c6004fe6136?q=80&w=3542&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724748860101-589aa7ee8b29?w=800&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NjgyfHx8ZW58MHx8fHx8',
'https://images.unsplash.com/photo-1724786594301-9a00b6ee8704?q=80&w=3295&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724963475892-a3274091955e?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725006709387-d820b307a1f2?q=80&w=3538&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1725014880788-9faccc7ca16e?w=800&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxleHBsb3JlLWZlZWR8NzIyfHx8ZW58MHx8fHx8',
'https://images.unsplash.com/photo-1724908549265-06972c22ca37?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724858103760-62648ebfa2a3?q=80&w=3130&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724757090342-59922ed19e39?q=80&w=3300&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
'https://images.unsplash.com/photo-1724689545475-67ff5bc78fac?q=80&w=3360&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
];
const ImageStressTest = () => (
<Document>
<Page style={{ padding: '20 40' }}>
{IMAGES.map((src) => (
<Image
key={src}
src={src}
style={{ width: '100%', marginBottom: 10 }}
/>
))}
</Page>
</Document>
);
export default {
id: 'image-steess-test',
name: 'Image Stress Test',
description: '',
Document: ImageStressTest,
};
================================================
FILE: packages/examples/vite/src/examples/index.ts
================================================
import duplicatedImages from './duplicated-images';
import ellipsis from './ellipsis';
import emoji from './emoji';
import fontFamilyFallback from './font-family-fallback';
import fontWeight from './font-weight';
import fractals from './fractals';
import goTo from './go-to';
import imageStressTest from './image-stress-test';
import JpgOrientation from './jpg-orientation';
import knobs from './knobs';
import link from './link';
import mediaQueries from './media-queries';
import minPresenceAhead from './min-presence-ahead';
import multilineText from './multiline-text';
import objectFit from './object-fit';
import pageWrap from './page-wrap';
import resume from './resume';
import svg from './svg';
import svgTransform from './svg-transform';
import transformOrigin from './transform-origin';
import forms from './forms';
import softHyphens from './soft-hyphens';
const EXAMPLES = [
duplicatedImages,
ellipsis,
emoji,
fontFamilyFallback,
fontWeight,
fractals,
goTo,
JpgOrientation,
knobs,
link,
mediaQueries,
minPresenceAhead,
multilineText,
objectFit,
pageWrap,
resume,
svg,
svgTransform,
transformOrigin,
imageStressTest,
forms,
softHyphens,
];
export default EXAMPLES;
================================================
FILE: packages/examples/vite/src/examples/jpg-orientation/index.tsx
================================================
import React from 'react';
import { Document, Page, Image, View } from '@react-pdf/renderer';
import Orientation1 from './images/orientation-1.jpeg';
import Orientation2 from './images/orientation-2.jpeg';
import Orientation3 from './images/orientation-3.jpeg';
import Orientation4 from './images/orientation-4.jpeg';
import Orientation5 from './images/orientation-5.jpeg';
import Orientation6 from './images/orientation-6.jpeg';
import Orientation7 from './images/orientation-7.jpeg';
import Orientation8 from './images/orientation-8.jpeg';
const JpgOrientation = () => (
<Document>
<Page>
<View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
<Image src={Orientation1} style={{ width: 220, margin: 5 }} />
<Image src={Orientation2} style={{ width: 220, margin: 5 }} />
<Image src={Orientation3} style={{ width: 220, margin: 5 }} />
<Image src={Orientation4} style={{ width: 220, margin: 5 }} />
<Image src={Orientation5} style={{ width: 220, margin: 5 }} />
<Image src={Orientation6} style={{ width: 220, margin: 5 }} />
<Image src={Orientation7} style={{ width: 220, margin: 5 }} />
<Image src={Orientation8} style={{ width: 220, margin: 5 }} />
</View>
</Page>
</Document>
);
export default {
id: 'jpg-orientation',
name: 'Jpg Orientation',
description: '',
Document: JpgOrientation,
};
================================================
FILE: packages/examples/vite/src/examples/knobs/index.tsx
================================================
import React from 'react';
import { Document, Page, View, Text, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
select: {
height: '9%',
alignItems: 'center',
flexDirection: 'row',
paddingHorizontal: '30px',
},
bar: {
flexGrow: 1,
height: '10px',
backgroundColor: 'gray',
},
barMiddle: {
width: '50%',
height: '100%',
backgroundColor: 'lightgray',
margin: 'auto',
},
knob: {
alignItems: 'center',
justifyContent: 'center',
width: '20px',
height: '20px',
borderRadius: 10,
borderWidth: 3,
borderColor: 'orange',
position: 'absolute',
backgroundColor: 'white',
fontSize: 8,
top: -6,
},
text: {
fontSize: 10,
},
});
const Knob = ({ value }) => (
<View style={[styles.knob, { left: `${value - 3}%` }]}>
<Text style={{ fontSize: 8 }}>{value}</Text>
</View>
);
const Select = (props) => (
<View style={styles.select}>
<Text style={[styles.text, { marginRight: '15px' }]}>0%</Text>
<View style={styles.bar}>
<View style={styles.barMiddle} />
<Knob {...props} />
</View>
<Text style={[styles.text, { marginLeft: '15px' }]}>100%</Text>
</View>
);
const Knobs = () => (
<Document>
<Page size="A5">
<Select value={0} />
<Select value={10} />
<Select value={20} />
<Select value={30} />
<Select value={40} />
<Select value={50} />
<Select value={60} />
<Select value={70} />
<Select value={80} />
<Select value={90} />
<Select value={100} />
</Page>
</Document>
);
export default {
id: 'knobs',
name: 'Knobs',
description: '',
Document: Knobs,
};
================================================
FILE: packages/examples/vite/src/examples/link/index.tsx
================================================
import React from 'react';
import { Document, Page, Link, Text, View } from '@react-pdf/renderer';
const LinkExample = () => (
<Document>
<Page>
<Link src="https://google.com">Some text link</Link>
<Link src="https://google.com">
Some <Text style={{ backgroundColor: 'red' }}>stylized</Text> text link
</Link>
<Link src="https://google.com">
<Text>
Some <Text style={{ backgroundColor: 'red' }}>stylized</Text> text
link
</Text>
</Link>
<Link src="https://google.com">
<View style={{ width: 40, height: 40, backgroundColor: 'red' }} />
</Link>
</Page>
</Document>
);
export default {
id: 'link',
name: 'Link',
description: '',
Document: LinkExample,
};
================================================
FILE: packages/examples/vite/src/examples/media-queries/index.tsx
================================================
import React from 'react';
import { Document, Page, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
body: {
padding: 35,
},
content: {
padding: 20,
'@media max-width: 400': {
flexDirection: 'column',
},
'@media min-width: 400': {
flexDirection: 'row',
},
},
block: {
height: 150,
width: 150,
backgroundColor: 'red',
},
});
const MediaComponent = () => (
<View style={styles.content}>
<View style={[styles.block, { backgroundColor: 'red' }]} />
<View style={[styles.block, { backgroundColor: 'green' }]} />
</View>
);
const MediaQueries = () => (
<Document>
<Page style={styles.body} size={[500, 600]}>
<MediaComponent />
</Page>
<Page style={styles.body} size={[300, 600]}>
<MediaComponent />
</Page>
</Document>
);
export default {
id: 'media-queries',
name: 'Media Queries',
description: '',
Document: MediaQueries,
};
================================================
FILE: packages/examples/vite/src/examples/min-presence-ahead/index.tsx
================================================
import React from 'react';
import { Document, Page, View, Text } from '@react-pdf/renderer';
const palette = [
'#781c81',
'#521b80',
'#442f8b',
'#3f4c9f',
'#4069b4',
'#4582c1',
'#4e96bd',
'#5aa6a9',
'#68b090',
'#7ab878',
'#8dbc64',
'#a2be56',
];
const MinPresenceAhead = () => (
<Document>
<Page style={{ padding: 20 }}>
{palette.map((color, i) => {
const minPresenceAhead = i === 8 ? 82 : 0;
return (
<View
key={color}
wrap={false}
minPresenceAhead={i === 8 ? 90 : 0}
style={{
width: '100%',
height: 80,
color: 'white',
backgroundColor: color,
}}
>
<Text>Index: {i}</Text>
<Text>MinPresenceAhead: {minPresenceAhead}</Text>
</View>
);
})}
</Page>
</Document>
);
export default {
id: 'min-presence-ahead',
name: 'Min Presence Ahead',
description: '',
Document: MinPresenceAhead,
};
================================================
FILE: packages/examples/vite/src/examples/multiline-text/index.tsx
================================================
import React from 'react';
import { Document, Page, View, Text, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
body: {
margin: 50,
},
highlight: {
backgroundColor: 'tomato',
textDecoration: 'line-through underline',
},
});
const MultilineText = () => (
<Document>
<Page size="A4">
<View style={styles.body}>
<Text style={{ backgroundColor: 'lightgray' }}>
Single line text with{' '}
<Text style={styles.highlight}>inline text highlighted</Text> Again
Black Text
</Text>
<Text style={{ backgroundColor: 'lightgray' }}>
Nested Text with{' '}
<Text style={styles.highlight}>inline text highlighted</Text> in a
long, long, long, long, long, long long
</Text>
</View>
</Page>
</Document>
);
export default {
id: 'multiline-text',
name: 'Multiline Text',
description: '',
Document: MultilineText,
};
================================================
FILE: packages/examples/vite/src/examples/object-fit/index.tsx
================================================
import React from 'react';
import {
Document,
Page,
View,
Image,
Text,
StyleSheet,
} from '@react-pdf/renderer';
const styles = StyleSheet.create({
image: {
objectFit: 'contain',
objectPosition: '0%',
width: '100%',
height: '100%',
},
surrounding: {
width: '200pt',
height: '200pt',
border: '1px solid red',
backgroundColor: 'tomato',
marginBottom: '10',
},
});
const ObjectFit = () => (
<Document>
<Page>
<View style={styles.surrounding}>
<Image
src="https://upload.wikimedia.org/wikipedia/commons/0/0c/Cow_female_black_white.jpg"
style={styles.image}
/>
<Text style={{ textDecoration: 'none' }}>Object Fit Contain</Text>
</View>
<View style={styles.surrounding}>
<Image
src="https://upload.wikimedia.org/wikipedia/commons/0/0c/Cow_female_black_white.jpg"
style={[styles.image, { objectFit: 'cover' }]}
/>
<Text>Object Fit: Auto</Text>
</View>
<View style={styles.surrounding}>
<Image
src="https://upload.wikimedia.org/wikipedia/commons/0/0c/Cow_female_black_white.jpg"
style={[styles.image, { objectFit: 'none' }]}
/>
<Text>Object Fit: None</Text>
</View>
</Page>
</Document>
);
export default {
id: 'object-fit',
name: 'Object Fit',
description: '',
Document: ObjectFit,
};
================================================
FILE: packages/examples/vite/src/examples/page-wrap/index.tsx
================================================
import React from 'react';
import {
Document,
Font,
Text,
Page,
Image,
StyleSheet,
} from '@react-pdf/renderer';
import Quijote1 from '../../../public/quijote1.jpg';
import Quijote2 from '../../../public/quijote2.png';
Font.register({
family: 'Oswald',
src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf',
});
const styles = StyleSheet.create({
body: {
paddingTop: 35,
paddingBottom: 65,
paddingHorizontal: 35,
},
title: {
fontSize: 24,
textAlign: 'center',
fontFamily: ['Oswald', 'Helvetica'],
},
author: {
fontSize: 12,
textAlign: 'center',
marginBottom: 40,
},
subtitle: {
fontSize: 18,
margin: 12,
fontFamily: 'Oswald',
},
text: {
margin: 12,
fontSize: 14,
textAlign: 'justify',
fontFamily: 'Times-Roman',
},
image: {
marginVertical: 15,
marginHorizontal: 100,
},
header: {
fontSize: 12,
marginBottom: 20,
textAlign: 'center',
color: 'grey',
},
pageNumber: {
position: 'absolute',
fontSize: 12,
bottom: 30,
left: 0,
right: 0,
textAlign: 'center',
color: 'grey',
},
});
const PageWrap = () => (
<Document>
<Page style={styles.body}>
<Text style={styles.header} fixed>
~ Created with react-pdf ~
</Text>
<Text style={styles.title}>Don Quijote de la Mancha</Text>
<Text style={styles.author}>Miguel de Cervantes</Text>
<Image style={styles.image} src={Quijote1} />
<Text style={styles.subtitle}>
Capítulo I: Que trata de la condición y ejercicio del famoso hidalgo D.
Quijote de la Mancha
</Text>
<Text style={styles.text}>
En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha
mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga
antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que
carnero, salpicón las más noches, duelos y quebrantos los sábados,
lentejas los viernes, algún palomino de añadidura los domingos,
consumían las tres partes de su hacienda. El resto della concluían sayo
de velarte, calzas de velludo para las fiestas con sus pantuflos de lo
mismo, los días de entre semana se honraba con su vellori de lo más
fino. Tenía en su casa una ama que pasaba de los cuarenta, y una sobrina
que no llegaba a los veinte, y un mozo de campo y plaza, que así
ensillaba el rocín como tomaba la podadera. Frisaba la edad de nuestro
hidalgo con los cincuenta años, era de complexión recia, seco de carnes,
enjuto de rostro; gran madrugador y amigo de la caza. Quieren decir que
tenía el sobrenombre de Quijada o Quesada (que en esto hay alguna
diferencia en los autores que deste caso escriben), aunque por
conjeturas verosímiles se deja entender que se llama Quijana; pero esto
importa poco a nuestro cuento; basta que en la narración dél no se salga
un punto de la verdad
</Text>
<Text style={styles.text}>
Es, pues, de saber, que este sobredicho hidalgo, los ratos que estaba
ocioso (que eran los más del año) se daba a leer libros de caballerías
con tanta afición y gusto, que olvidó casi de todo punto el ejercicio de
la caza, y aun la administración de su hacienda; y llegó a tanto su
curiosidad y desatino en esto, que vendió muchas hanegas de tierra de
sembradura, para comprar libros de caballerías en que leer; y así llevó
a su casa todos cuantos pudo haber dellos; y de todos ningunos le
parecían tan bien como los que compuso el famoso Feliciano de Silva:
porque la claridad de su prosa, y aquellas intrincadas razones suyas, le
parecían de perlas; y más cuando llegaba a leer aquellos requiebros y
cartas de desafío, donde en muchas partes hallaba escrito: la razón de
la sinrazón que a mi razón se hace, de tal manera mi razón enflaquece,
que con razón me quejo de la vuestra fermosura, y también cuando leía:
los altos cielos que de vuestra divinidad divinamente con las estrellas
se fortifican, y os hacen merecedora del merecimiento que merece la
vuestra grandeza.
</Text>
<Text style={styles.text}>
Con estas y semejantes razones perdía el pobre caballero el juicio, y
desvelábase por entenderlas, y desentrañarles el sentido, que no se lo
sacara, ni las entendiera el mismo Aristóteles, si resucitara para sólo
ello. No estaba muy bien con las heridas que don Belianis daba y
recibía, porque se imaginaba que por grandes maestros que le hubiesen
curado, no dejaría de tener el rostro y todo el cuerpo lleno de
cicatrices y señales; pero con todo alababa en su autor aquel acabar su
libro con la promesa de aquella inacabable aventura, y muchas veces le
vino deseo de tomar la pluma, y darle fin al pie de la letra como allí
se promete; y sin duda alguna lo hiciera, y aun saliera con ello, si
otros mayores y continuos pensamientos no se lo estorbaran. Tuvo muchas
veces competencia con el cura de su lugar (que era hombre docto graduado
en Sigüenza), sobre cuál había sido mejor caballero, Palmerín de
Inglaterra o Amadís de Gaula; mas maese Nicolás, barbero del mismo
pueblo, decía que ninguno llegaba al caballero del Febo, y que si alguno
se le podía comparar, era don Galaor, hermano de Amadís de Gaula, porque
tenía muy acomodada condición para todo; que no era caballero
melindroso, ni tan llorón como su hermano, y que en lo de la valentía no
le iba en zaga.
</Text>
<Text style={styles.text}>
En resolución, él se enfrascó tanto en su lectura, que se le pasaban las
noches leyendo de claro en claro, y los días de turbio en turbio, y así,
del poco dormir y del mucho leer, se le secó el cerebro, de manera que
vino a perder el juicio. Llenósele la fantasía de todo aquello que leía
en los libros, así de encantamientos, como de pendencias, batallas,
desafíos, heridas, requiebros, amores, tormentas y disparates
imposibles, y asentósele de tal modo en la imaginación que era verdad
toda aquella máquina de aquellas soñadas invenciones que leía, que para
él no había otra historia más cierta en el mundo.
</Text>
<Text style={styles.subtitle} break>
Capítulo II: Que trata de la primera salida que de su tierra hizo el
ingenioso Don Quijote
</Text>
<Image style={styles.image} src={Quijote2} />
<Text style={styles.text}>
Hechas, pues, estas prevenciones, no quiso aguardar más tiempo a poner
en efeto su pensamiento, apretándole a ello la falta que él pensaba que
hacía en el mundo su tardanza, según eran los agravios que pensaba
deshacer, tuertos que enderezar, sinrazones que emendar y abusos que
mejorar y deudas que satisfacer. Y así, sin dar parte a persona alguna
de su intención y sin que nadie le viese, una mañana, antes del día, que
era uno de los calurosos del mes de Julio, se armó de todas sus armas,
subió sobre Rocinante, puesta su mal compuesta celada, embrazó su
adarga, tomó su lanza y por la puerta falsa de un corral salió al campo
con grandísimo contento y alborozo de ver con cuánta facilidad había
dado principio a su buen deseo. Mas apenas se vio en el campo cuando le
asaltó un pensamiento terrible, y tal, que por poco le hiciera dejar la
comenzada empresa; y fue que le vino a la memoria que no era armado
caballero, y que, conforme a ley de caballería, ni podía ni debía tomar
armas con ningún caballero; y puesto que lo fuera, había de llevar armas
blancas, como novel caballero, sin empresa en el escudo, hasta que por
su esfuerzo la ganase. Estos pensamientos le hicieron titubear en su
propósito; mas pudiendo más su locura que otra razón alguna, propuso de
hacerse armar caballero del primero que topase, a imitación de otros
muchos que así lo hicieron, según él había leído en los libros que tal
le tenían. En lo de las armas blancas, pensaba limpiarlas de manera, en
teniendo lugar, que lo fuesen más que un arminio; y con esto se quietó18
y prosiguió su camino, sin llevar otro que aquel que su caballo quería,
creyendo que en aquello consistía la fuerza de las aventuras
</Text>
<Text style={styles.text}>
Yendo, pues, caminando nuestro flamante aventurero, iba hablando consigo
mesmo, y diciendo: —¿Quién duda, sino que en los venideros tiempos,
cuando salga a luz la verdadera historia de mis famosos hechos, que el
sabio que los escribiere no ponga, cuando llegue a contar esta mi
primera salida tan de mañana, desta manera?: Apenas había el rubicundo
Apolo tendido por la faz de la ancha y espaciosa tierra las doradas
hebras de sus hermosos cabellos, y apenas los pequeños y pintados
pajarillos con sus arpadas lenguas habían saludado con dulce y meliflua
armonía la venida de la rosada Aurora, que, dejando la blanda cama del
celoso marido, por las puertas y balcones del manchego horizonte a los
mortales se mostraba, cuando el famoso caballero don Quijote de la
Mancha, dejando las ociosas plumas, subió sobre su famoso caballo
Rocinante y comenzó a caminar por el antiguo y conocido Campo de
Montiel.
</Text>
<Text style={styles.text}>
Y era la verdad que por él caminaba; y añadió diciendo: —Dichosa edad y
siglo dichoso aquel adonde saldrán a luz las famosas hazañas mías,
dignas de entallarse en bronces, esculpirse en mármoles y pintarse en
tablas, para memoria en lo futuro. ¡Oh tú, sabio encantador, quienquiera
que seas, a quien ha de tocar el ser coronista desta peregrina historia!
Ruégote que no te olvides de mi buen Rocinante, compañero eterno mío en
todos mis caminos y carreras.
</Text>
<Text style={styles.text}>
Luego volvía diciendo, como si verdaderamente fuera enamorado: —¡Oh
princesa Dulcinea, señora deste cautivo corazón! Mucho agravio me
habedes fecho en despedirme y reprocharme con el riguroso afincamiento
de mandarme no parecer ante la vuestra fermosura. Plégaos, señora, de
membraros deste vuestro sujeto corazón, que tantas cuitas por vuestro
amor padece. Con estos iba ensartando otros disparates, todos al modo de
los que sus libros le habían enseñado, imitando en cuanto podía su
lenguaje. Con esto caminaba tan despacio, y el sol entraba tan apriesa y
con tanto ardor, que fuera bastante a derretirle los sesos, si algunos
tuviera
</Text>
<Text style={styles.text}>
Casi todo aquel día caminó sin acontecerle cosa que de contar fuese, de
lo cual se desesperaba, porque quisiera topar luego luego con quien
hacer experiencia del valor de su fuerte brazo. Autores hay que dicen
que la primera aventura que le avino fue la del Puerto Lápice, otros
dicen que la de los molinos de viento; pero lo que yo he podido
averiguar en este caso, y lo que he hallado escrito en los anales de la
Mancha, es que él anduvo todo aquel día, y, al anochecer, su rocín y él
se hallaron cansados y muertos de hambre, y que, mirando a todas partes
por ver si descubriría algún castillo o alguna majada de pastores donde
recogerse y adonde pudiese remediar su mucha hambre y necesidad, vio, no
lejos del camino por donde iba, una venta,que fue como si viera una
estrella que, no a los portales, sino a los alcázares de su redención le
encaminaba. Diose priesa a caminar, y llegó a ella a tiempo que
anochecía.
</Text>
<Text
fixed
style={styles.pageNumber}
render={({ pageNumber, totalPages }) => `${pageNumber} / ${totalPages}`}
/>
</Page>
</Document>
);
export default {
id: 'page-wrap',
name: 'Page Wrap',
description: '',
Document: PageWrap,
};
================================================
FILE: packages/examples/vite/src/examples/resume/Education.tsx
================================================
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
import Title from './Title';
const styles = StyleSheet.create({
container: {
marginBottom: 10,
},
school: {
fontFamily: 'Lato Bold',
fontSize: 10,
},
degree: {
fontFamily: 'Lato',
fontSize: 10,
},
candidate: {
fontFamily: 'Lato Italic',
fontSize: 10,
},
});
const Education = () => (
<View style={styles.container}>
<Title>Education</Title>
<Text style={styles.school}>Jedi Academy</Text>
<Text style={styles.degree}>Jedi Master</Text>
<Text style={styles.candidate}>A long, long time ago</Text>
</View>
);
export default Education;
================================================
FILE: packages/examples/vite/src/examples/resume/Experience.tsx
================================================
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
import Title from './Title';
import List, { Item } from './List';
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: 30,
paddingLeft: 15,
'@media max-width: 400': {
paddingTop: 10,
paddingLeft: 0,
},
},
entryContainer: {
marginBottom: 10,
},
date: {
fontSize: 11,
fontFamily: 'Lato Italic',
},
detailLeftColumn: {
flexDirection: 'column',
marginLeft: 10,
marginRight: 10,
},
detailRightColumn: {
flexDirection: 'column',
flexGrow: 9,
},
bulletPoint: {
fontSize: 10,
},
details: {
fontSize: 10,
fontFamily: 'Lato',
},
headerContainer: {
flexDirection: 'row',
marginBottom: 10,
},
leftColumn: {
flexDirection: 'column',
flexGrow: 9,
},
rightColumn: {
flexDirection: 'column',
flexGrow: 1,
alignItems: 'flex-end',
justifySelf: 'flex-end',
},
title: {
fontSize: 11,
color: 'black',
textDecoration: 'none',
fontFamily: 'Lato Bold',
},
});
const ExperienceEntry = ({ company, details, position, date }) => {
const title = `${company} | ${position}`;
return (
<View style={styles.entryContainer}>
<View style={styles.headerContainer}>
<View style={styles.leftColumn}>
<Text style={styles.title}>{title}</Text>
</View>
<View style={styles.rightColumn}>
<Text style={styles.date}>{date}</Text>
</View>
</View>
<List>
{details.map((detail) => (
<Item key={detail.company}>{detail}</Item>
))}
</List>
</View>
);
};
const experienceData = [
{
company: 'Jedi Temple, Coruseant',
date: 'A long time ago...',
details: [
'Started a new Jedi Temple in order to train the next generation of Jedi Masters',
'Discovered and trained a new generation of Jedi Knights, which he recruited from within the New Republic',
'Communicates with decesased Jedi Masters such as Anakin Skywalker, Yoda, Obi-Wan Kenobi in order to learn the secrets of the Jedi Order',
],
position: 'Head Jedi Master',
},
{
company: 'Rebel Alliance',
date: 'A long time ago...',
details: [
'Lead legions of troops into battle while demonstrating bravery, competence and honor',
'Created complicated battle plans in conjunction with other Rebel leaders in order to ensure the greatest chance of success',
'Defeated Darth Vader in single-combat, and convinced him to betray his mentor, the Emperor',
],
position: 'General',
},
{
company: 'Rebel Alliance',
date: 'A long time ago...',
details: [
'Destroyed the Death Star by using the force to find its only weakness and delivering a torpedo into the center of the ship',
'Commanded of squadron of X-Wings into battle',
'Defeated an enemy AT-AT single handedly after his ship was destroyed',
'Awarded a medal for valor and bravery in battle for his successful destruction of the Death Star',
],
position: 'Lieutenant Commander',
},
{
company: 'Tatooine Moisture Refinery',
date: 'A long time ago...',
details: [
'Replaced damaged power converters',
'Performed menial labor thoughout the farm in order to ensure its continued operation',
],
position: 'Moisture Farmer',
},
];
const Experience = () => (
<View style={styles.container}>
<Title>Experience</Title>
{experienceData.map(({ company, date, details, position }) => (
<ExperienceEntry
company={company}
date={date}
details={details}
key={company + position}
position={position}
/>
))}
</View>
);
export default Experience;
================================================
FILE: packages/examples/vite/src/examples/resume/Header.tsx
================================================
import React from 'react';
import { Link, Text, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
borderBottomWidth: 2,
borderBottomColor: '#112131',
borderBottomStyle: 'solid',
alignItems: 'stretch',
},
detailColumn: {
flexDirection: 'column',
flexGrow: 9,
textTransform: 'uppercase',
},
linkColumn: {
flexDirection: 'column',
flexGrow: 2,
alignSelf: 'flex-end',
justifySelf: 'flex-end',
},
name: {
fontSize: 24,
fontFamily: 'Lato Bold',
},
subtitle: {
fontSize: 10,
justifySelf: 'flex-end',
fontFamily: 'Lato',
},
link: {
fontFamily: 'Lato',
fontSize: 10,
color: 'black',
textDecoration: 'none',
alignSelf: 'flex-end',
justifySelf: 'flex-end',
},
});
const Header = () => (
<View style={styles.container}>
<View style={styles.detailColumn}>
<Text style={styles.name}>Luke Skywalker</Text>
<Text style={styles.subtitle}>Jedi Master</Text>
</View>
<View style={styles.linkColumn}>
<Link href="mailto:luke@theforce.com" style={styles.link}>
luke@theforce.com
</Link>
</View>
</View>
);
export default Header;
================================================
FILE: packages/examples/vite/src/examples/resume/List.tsx
================================================
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
item: {
flexDirection: 'row',
marginBottom: 5,
},
bulletPoint: {
width: 10,
fontSize: 10,
},
itemContent: {
flex: 1,
fontSize: 10,
fontFamily: 'Lato',
},
});
const List = ({ children }) => children;
export const Item = ({ children }) => (
<View style={styles.item}>
<Text style={styles.bulletPoint}>•</Text>
<Text style={styles.itemContent}>{children}</Text>
</View>
);
export default List;
================================================
FILE: packages/examples/vite/src/examples/resume/Skills.tsx
================================================
import React from 'react';
import { Text, View, StyleSheet } from '@react-pdf/renderer';
import Title from './Title';
import List, { Item } from './List';
const styles = StyleSheet.create({
title: {
fontFamily: 'Lato Bold',
fontSize: 11,
marginBottom: 10,
},
skills: {
fontFamily: 'Lato',
fontSize: 10,
marginBottom: 10,
},
});
const SkillEntry = ({ name, skills }) => (
<View>
<Text style={styles.title}>{name}</Text>
<List>
{skills.map((skill) => (
<Item key={skill}>{skill}</Item>
))}
</List>
</View>
);
const Skills = () => (
<View>
<Title>Skills</Title>
<SkillEntry
name="Combat Abilities"
skills={[
'Completed Jedi Master training and built a lightsaber from scratch in order to do battle against the Empire',
'Defeated the Rancor and rescued Princess Leia from Jabba the Hutt',
'Competent fighter pilot as well as an excelent shot with nearly any weapon',
]}
/>
</View>
);
export default Skills;
================================================
FILE: packages/examples/vite/src/examples/resume/Title.tsx
================================================
import React from 'react';
import { Text, StyleSheet } from '@react-pdf/renderer';
const styles = StyleSheet.create({
title: {
fontFamily: 'Lato Bold',
fontSize: 14,
marginBottom: 10,
textTransform: 'uppercase',
},
});
const Title = ({ children }) => <Text style={styles.title}>{children}</Text>;
export default Title;
================================================
FILE: packages/examples/vite/src/examples/resume/index.tsx
================================================
import React from 'react';
import {
Text,
Font,
Page,
View,
Image,
Document,
StyleSheet,
} from '@react-pdf/renderer';
import Header from './Header';
import Skills from './Skills';
import Education from './Education';
import Experience from './Experience';
const styles = StyleSheet.create({
page: {
padding: 30,
},
container: {
flex: 1,
flexDirection: 'row',
'@media max-width: 400': {
flexDirection: 'column',
},
},
image: {
marginBottom: 10,
},
leftColumn: {
flexDirection: 'column',
width: 170,
paddingTop: 30,
paddingRight: 15,
'@media max-width: 400': {
width: '100%',
paddingRight: 0,
},
'@media orientation: landscape': {
width: 200,
},
},
footer: {
fontSize: 12,
fontFamily: 'Lato Bold',
textAlign: 'center',
marginTop: 15,
paddingTop: 5,
borderWidth: 3,
borderColor: 'gray',
borderStyle: 'dashed',
'@media orientation: landscape': {
marginTop: 10,
},
},
});
Font.register({
family: 'Open Sans',
src: `https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFVZ0e.ttf`,
});
Font.register({
family: 'Lato',
src: `https://fonts.gstatic.com/s/lato/v16/S6uyw4BMUTPHjx4wWw.ttf`,
});
Font.register({
family: 'Lato Italic',
src: `https://fonts.gstatic.com/s/lato/v16/S6u8w4BMUTPHjxsAXC-v.ttf`,
});
Font.register({
family: 'Lato Bold',
src: `https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh6UVSwiPHA.ttf`,
});
const IMAGE_SRC =
'https://i.guim.co.uk/img/media/a23aeb1f7ff20bb80f68852da17743b0e557f8ed/0_224_3504_2102/master/3504.jpg?width=1200&height=1200&quality=85&auto=format&fit=crop&s=9e9a99e479ee60270b69ede4d869b20f';
const Resume = (props) => (
<Page {...props} style={styles.page}>
<Header />
<View style={styles.container}>
<View style={styles.leftColumn}>
<Image src={IMAGE_SRC} style={styles.image} />
<Education />
<Skills />
</View>
<Experience />
</View>
<Text style={styles.footer}>This IS the candidate you are looking for</Text>
</Page>
);
const ResumeDocument = () => (
<Document
author="Luke Skywalker"
keywords="awesome, resume, start wars"
subject="The resume of Luke Skywalker"
title="Resume"
>
<Resume size="A4" />
<Resume orientation="landscape" size="A4" />
<Resume size={[380, 1250]} />
</Document>
);
export default {
id: 'resume',
name: 'Resume',
description: '',
Document: ResumeDocument,
};
================================================
FILE: packages/examples/vite/src/examples/soft-hyphens/index.tsx
================================================
import React from 'react';
import { Document, Page, Font, Text, StyleSheet } from '@react-pdf/renderer';
const shy = '\u00ad';
Font.register({
family: 'Oswald',
src: 'https://fonts.gstatic.com/s/oswald/v13/Y_TKV6o8WovbUd3m_X9aAA.ttf',
});
const styles = StyleSheet.create({
body: {
padding: 20,
},
text: {
fontFamily: 'Oswald',
fontSize: 20,
width: 100,
border: '1px solid red',
},
});
const SoftHyphens = () => (
<Document>
<Page style={styles.body}>
<Text
style={styles.text}
>{`Potentieel broeikas${shy}gas${shy}emissie${shy}rapport`}</Text>
</Page>
</Document>
);
export default {
id: 'soft-hyphens',
name: 'Soft Hyphens',
description: '',
Document: SoftHyphens,
};
================================================
FILE: packages/examples/vite/src/examples/svg/Car.tsx
================================================
import * as React from 'react';
import {
Svg,
Defs,
LinearGradient,
RadialGradient,
Stop,
Path,
G,
} from '@react-pdf/renderer';
const Car = () => (
<Svg id="svg2" width="100%" height="600" viewBox="0 0 900 600">
<Defs>
<LinearGradient id="linearGradient4399">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient5360">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#ebf1f1" stopOpacity="1"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient5297">
<Stop offset="0" stopColor="#dfa60e" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfa60e" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4695">
<Stop offset="0" stopColor="#fffb86" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4424">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4298">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4371">
<Stop offset="0" stopColor="#bdbdbd" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#bdbdbd" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4345">
<Stop offset="0" stopColor="#dfeff5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfeff5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4337">
<Stop offset="0" stopColor="#dfeff5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfeff5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4277">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4269">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4259">
<Stop offset="0" stopColor="#dfeff5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfeff5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4247">
<Stop offset="0" stopColor="#dfeff5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfeff5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4235">
<Stop offset="0" stopColor="#dfeff5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfeff5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4273">
<Stop offset="0" stopColor="#161616" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#161616" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4431">
<Stop offset="0" stopColor="#1c1f24" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#373e48" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4278">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4270">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4262">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4254">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4246">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4238">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4228">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4147">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d6e9e8" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4139">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4127">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4115">
<Stop offset="0" stopColor="#fefefe" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fefefe" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4102">
<Stop offset="0" stopColor="#fefefe" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fefefe" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4091">
<Stop offset="0" stopColor="#fefefe" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fefefe" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4076">
<Stop offset="0" stopColor="#d7d7d7" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d7d7d7" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4781">
<Stop offset="0" stopColor="#1a3451" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1a3451" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4672">
<Stop offset="0" stopColor="#e4e4e4" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e4e4e4" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4662">
<Stop offset="0" stopColor="#e3ecf6" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e3ecf6" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4652">
<Stop offset="0" stopColor="#e3ecf6" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e3ecf6" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4642">
<Stop offset="0" stopColor="#3f4e50" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#3f4e50" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4558">
<Stop offset="0" stopColor="#131313" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#131313" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4479">
<Stop offset="0" stopColor="#e3dcc1" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e3dcc1" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4447">
<Stop offset="0" stopColor="#0f0b03" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#0f0b03" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4433">
<Stop offset="0" stopColor="#231002" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#231002" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4372">
<Stop offset="0" stopColor="#e1e1e1" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e1e1e1" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4362">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4291">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4281">
<Stop offset="0" stopColor="#c7c7c7" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#c7c7c7" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4265">
<Stop offset="0" stopColor="#bca714" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#bca714" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4253">
<Stop offset="0" stopColor="#84750f" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e5b027" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4231">
<Stop offset="0" stopColor="#4b5657" stopOpacity="1"></Stop>
<Stop offset="0.785" stopColor="#57524b" stopOpacity="0.665"></Stop>
<Stop offset="1" stopColor="#4b5657" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4220">
<Stop offset="0" stopColor="#637083" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#637083" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4207">
<Stop offset="0" stopColor="#262e2e" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#262e2e" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4186">
<Stop offset="0" stopColor="#262e2e" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#262e2e" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4114">
<Stop offset="0" stopColor="#090b0b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#090b0b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4097">
<Stop offset="0" stopColor="#e7ecec" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e7ecec" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4085">
<Stop offset="0" stopColor="#c5d0d1" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#c5d0d1" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3916">
<Stop offset="0" stopColor="#8e8e8e" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#8e8e8e" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4402">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4312">
<Stop offset="0" stopColor="#c9d4e7" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#c9d4e7" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4300">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4258">
<Stop offset="0" stopColor="#dedede" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dedede" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4232">
<Stop offset="0" stopColor="#887077" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#887077" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4222">
<Stop offset="0" stopColor="#282123" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#282123" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4212">
<Stop offset="0" stopColor="#d5ccce" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d5ccce" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4206">
<Stop offset="0" stopColor="#281700" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0.235"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4192">
<Stop offset="0" stopColor="#ede9ea" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#ede9ea" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4182">
<Stop offset="0" stopColor="#746164" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#746164" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4151">
<Stop offset="0" stopColor="#281700" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#5a3502" stopOpacity="0.237"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4143">
<Stop offset="0" stopColor="#f9cb53" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fffffd" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4061">
<Stop offset="0" stopColor="#d4d969" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d4d969" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient
xlinkHref="#linearGradient4061"
id="linearGradient4067"
x1="708.086"
x2="710.521"
y1="416.542"
y2="423.02"
gradientTransform="translate(-74.868 -105.378)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient id="linearGradient4069">
<Stop offset="0" stopColor="#1f2116" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1f2116" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient
xlinkHref="#linearGradient4069"
id="linearGradient4075"
x1="713.037"
x2="716.147"
y1="416.542"
y2="423.02"
gradientTransform="translate(-74.868 -105.378)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient id="linearGradient4125">
<Stop offset="0" stopColor="#1c1001" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4113">
<Stop offset="0" stopColor="#f9c176" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f9c176" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4000">
<Stop offset="0" stopColor="#f0d866" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f0d866" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3986">
<Stop offset="0" stopColor="#6a510d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#6a510d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3967">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3957">
<Stop offset="0" stopColor="#b6a038" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#b6a038" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3931">
<Stop offset="0" stopColor="#1a1c23" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1a1c23" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3921">
<Stop offset="0" stopColor="#cab714" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#cab714" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3784">
<Stop offset="0" stopColor="#e0e2e8" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e0e2e8" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3774">
<Stop offset="0" stopColor="#e0e2e8" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e0e2e8" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3764">
<Stop offset="0" stopColor="#b2b7c5" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#b2b7c5" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3732">
<Stop offset="0" stopColor="#bfbfbf" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#bfbfbf" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3681">
<Stop offset="0" stopColor="#d8f3f6" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d8f3f6" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3887">
<Stop offset="0" stopColor="#1b1815" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1b1815" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3645">
<Stop offset="0" stopColor="#c7eef2" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#c7eef2" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3708">
<Stop offset="0" stopColor="#b4c1d1" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#b4c1d1" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3698">
<Stop offset="0" stopColor="#405069" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#405069" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3687">
<Stop offset="0" stopColor="#8190aa" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#8190aa" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3611">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3599">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3589">
<Stop offset="0" stopColor="#443c30" stopOpacity="0"></Stop>
<Stop offset="0" stopColor="#443c30" stopOpacity="0"></Stop>
<Stop offset="1" stopColor="#303c44" stopOpacity="1"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3571">
<Stop offset="0" stopColor="#565656" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#565656" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3549">
<Stop offset="0" stopColor="#392b1b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#392b1b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3539">
<Stop offset="0" stopColor="#392b1b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#392b1b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3529">
<Stop offset="0" stopColor="#392b1b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#392b1b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3515">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3504">
<Stop offset="0" stopColor="#1e1125" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#111d25" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3480">
<Stop offset="0" stopColor="#676986" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#676986" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3462">
<Stop offset="0" stopColor="#e0b80d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f6dc6d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3443">
<Stop offset="0" stopColor="#63441b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#63441b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3433">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3401">
<Stop offset="0" stopColor="#00006b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#00006b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3393">
<Stop offset="0" stopColor="#1a1400" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#544400" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3382">
<Stop offset="0" stopColor="#e9fdff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e9fdff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3374">
<Stop offset="0" stopColor="#eaaa00" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#eaaa00" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3346">
<Stop offset="0" stopColor="#00006b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#00006b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3328">
<Stop offset="0" stopColor="#2e3f54" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#2e3f54" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3312">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3302">
<Stop offset="0" stopColor="#bfac28" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#624715" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3292">
<Stop offset="0" stopColor="#fbf6ed" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fbf6ed" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3284">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3276">
<Stop offset="0" stopColor="#2c210b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#2c210b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3265">
<Stop offset="0" stopColor="#e3eef8" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#e3eef8" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3254">
<Stop offset="0" stopColor="#583116" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#583116" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3236">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3226">
<Stop offset="0" stopColor="#4c1658" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#162458" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3212">
<Stop offset="0" stopColor="#0d2133" stopOpacity="0"></Stop>
<Stop offset="0.714" stopColor="#0d2133" stopOpacity="0"></Stop>
<Stop offset="1" stopColor="#0d2133" stopOpacity="0.897"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3202">
<Stop offset="0" stopColor="#ddbe3b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#ddbe3b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3176">
<Stop offset="0" stopColor="#e3eef8" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#5295d2" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3160">
<Stop offset="0" stopColor="#6f521d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#6f521d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3144">
<Stop offset="0" stopColor="#a3e5e7" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#a3e5e7" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3135">
<Stop offset="0" stopColor="#94b4e2" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#8a8925" stopOpacity="1"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4181">
<Stop offset="0" stopColor="#1c2e3b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1c2e3b" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4166">
<Stop offset="0" stopColor="#edd135" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#edec35" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4152">
<Stop offset="0" stopColor="#1d1504" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1d1504" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4144">
<Stop offset="0" stopColor="#694312" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#977f1a" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4134">
<Stop offset="0" stopColor="#92cadb" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#92cadb" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4124">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4100">
<Stop offset="0" stopColor="#fdfbf9" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fdfbf9" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4078">
<Stop offset="0" stopColor="#613c24" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#613c24" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4068">
<Stop offset="0" stopColor="#709ac9" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#709ac9" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4040">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4022">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient4001">
<Stop offset="0" stopColor="#201c14" stopOpacity="1"></Stop>
<Stop offset="0.507" stopColor="#201c14" stopOpacity="0.498"></Stop>
<Stop offset="1" stopColor="#201c14" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3989">
<Stop offset="0" stopColor="#977f1a" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#977f1a" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3979">
<Stop offset="0" stopColor="#201c14" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#201c14" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3869">
<Stop offset="0" stopColor="#dfc61d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dfc61d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3851">
<Stop offset="0" stopColor="#7b6752" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#7b6752" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3833">
<Stop offset="0" stopColor="#eff4f4" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#eff4f4" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3802">
<Stop offset="0" stopColor="#e8ebf1" stopOpacity="0"></Stop>
<Stop offset="0.819" stopColor="#e8ebf1" stopOpacity="0"></Stop>
<Stop offset="1" stopColor="#e8ebf1" stopOpacity="1"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3782">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3747">
<Stop offset="0" stopColor="#e6e1d7" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3733">
<Stop offset="0" stopColor="#debe39" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#debe39" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3725">
<Stop offset="0" stopColor="#6d899b" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d9e6e6" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3713">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d9e6e6" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3701">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3691">
<Stop offset="0" stopColor="#021d2a" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#021d2a" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3668">
<Stop offset="0" stopColor="#858b94" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#858b94" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3656">
<Stop offset="0" stopColor="#d4f0fc" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d4f0fc" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3638">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3610">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3578">
<Stop offset="0" stopColor="#cce5f8" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#cce5f8" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3554">
<Stop offset="0" stopColor="#e7eef4" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#b8f2f4" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3536">
<Stop offset="0" stopColor="#030303" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#030303" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3526">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3516">
<Stop offset="0" stopColor="#223f69" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#223f69" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3503">
<Stop offset="0" stopColor="#2b4268" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#2b4268" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3489">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3471">
<Stop offset="0" stopColor="#647e9d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#64969d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3461">
<Stop offset="0" stopColor="#000" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#000" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3453">
<Stop offset="0" stopColor="#e9f0f1" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#dddcca" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3303">
<Stop offset="0" stopColor="#1f2429" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#1f2429" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3289">
<Stop offset="0" stopColor="#97a4af" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#97a4af" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3279">
<Stop offset="0" stopColor="#b3890d" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#b3890d" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3269">
<Stop offset="0" stopColor="#6c6654" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#6c6654" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3263">
<Stop offset="0" stopColor="#2a3737" stopOpacity="0.829"></Stop>
<Stop offset="1" stopColor="#2a3737" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3255">
<Stop offset="0" stopColor="#d09e1c" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fceeaf" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3201">
<Stop offset="0" stopColor="#2a3737" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#2a3737" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3191">
<Stop offset="0" stopColor="#f9dd67" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f9dd67" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3173">
<Stop offset="0" stopColor="#f6f6bf" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f6f6bf" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3163">
<Stop offset="0" stopColor="#635646" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#635646" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3155">
<Stop offset="0" stopColor="#d5b42a" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#d5b42a" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3145">
<Stop offset="0" stopColor="#fff" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3137">
<Stop offset="0" stopColor="#c6c6e9" stopOpacity="0.235"></Stop>
<Stop offset="1" stopColor="#fff" stopOpacity="0.789"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3127">
<Stop offset="0" stopColor="#e4b125" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#f9dd67" stopOpacity="0.171"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3105">
<Stop offset="0" stopColor="#fef7d9" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#fef7d9" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient id="linearGradient3097">
<Stop offset="0" stopColor="#c09c07" stopOpacity="1"></Stop>
<Stop offset="1" stopColor="#c09c07" stopOpacity="0"></Stop>
</LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3097"
id="linearGradient3103"
x1="578.82"
x2="549.177"
y1="619.832"
y2="293.018"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3105"
id="linearGradient3111"
x1="635.802"
x2="592.544"
y1="431.433"
y2="354.186"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3137"
id="linearGradient3143"
x1="526.297"
x2="520.667"
y1="341.857"
y2="331.979"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3145"
id="linearGradient3151"
x1="648.12"
x2="155.123"
y1="281.91"
y2="396.756"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3155"
id="linearGradient3161"
x1="497.199"
x2="369.676"
y1="475.129"
y2="284.239"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3163"
id="linearGradient3169"
x1="278.91"
x2="630.341"
y1="382.105"
y2="313.813"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3173"
id="linearGradient3179"
x1="300.847"
x2="585.625"
y1="381.955"
y2="299.948"
gradientTransform="translate(-77.89 -100.39)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3191"
id="linearGradient3197"
x1="516.468"
x2="474.345"
y1="240.593"
y2="316.924"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3263"
id="linearGradient3207"
x1="1062.22"
x2="660.035"
y1="561.752"
y2="324.926"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3201"
id="linearGradient3211"
x1="480.532"
x2="477.962"
y1="592.433"
y2="481.788"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3269"
id="linearGradient3275"
x1="708.28"
x2="738.932"
y1="348.272"
y2="351.773"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3279"
id="linearGradient3285"
x1="704.078"
x2="747.796"
y1="383.286"
y2="380.315"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3289"
id="linearGradient3295"
x1="302.664"
x2="315.181"
y1="551.522"
y2="506.957"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3453"
id="linearGradient3459"
x1="688.764"
x2="685.008"
y1="185.161"
y2="213.89"
gradientTransform="matrix(1.17775 0 0 .5551 -194.578 -15.364)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3461"
id="linearGradient3467"
x1="674.721"
x2="676.426"
y1="299.554"
y2="185.664"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3471"
id="linearGradient3477"
x1="742.419"
x2="675.081"
y1="250.532"
y2="238.648"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3471"
id="linearGradient3481"
x1="462.151"
x2="517.616"
y1="242.609"
y2="252.513"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3471"
id="linearGradient3485"
x1="469.083"
x2="472.555"
y1="283.052"
y2="263.901"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3503"
id="linearGradient3509"
x1="684.874"
x2="679.272"
y1="164.613"
y2="268.604"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3516"
id="linearGradient3522"
x1="563.317"
x2="563.011"
y1="192.752"
y2="218.501"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3526"
id="linearGradient3532"
x1="642.98"
x2="597.586"
y1="146.955"
y2="292.613"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3536"
id="linearGradient3542"
x1="631.775"
x2="631.199"
y1="196.675"
y2="205.779"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3536"
id="linearGradient3546"
x1="730.515"
x2="719.435"
y1="231.689"
y2="233.09"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3536"
id="linearGradient3550"
x1="720.01"
x2="714.533"
y1="212.781"
y2="217.683"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3554"
id="linearGradient3560"
x1="488.218"
x2="496.746"
y1="234.49"
y2="242.893"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3578"
id="linearGradient3584"
x1="615.005"
x2="714.039"
y1="219.211"
y2="219.211"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3578"
id="linearGradient3586"
x1="504.086"
x2="578.857"
y1="233.819"
y2="233.819"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3578"
id="linearGradient3588"
x1="480.318"
x2="530.33"
y1="235.8"
y2="235.8"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3610"
id="linearGradient3616"
x1="629.552"
x2="628.677"
y1="200.914"
y2="216.784"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3638"
id="linearGradient3644"
x1="745.993"
x2="727.567"
y1="222.65"
y2="229.088"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3656"
id="linearGradient3662"
x1="774.535"
x2="792.9"
y1="222.195"
y2="254.876"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3668"
id="linearGradient3674"
x1="783.613"
x2="755.602"
y1="277.358"
y2="208.73"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3691"
id="linearGradient3697"
x1="742.331"
x2="742.331"
y1="238.501"
y2="232.059"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3701"
id="linearGradient3707"
x1="749.855"
x2="734.104"
y1="250.38"
y2="252.856"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3725"
id="linearGradient3723"
x1="776.611"
x2="795.518"
y1="253.198"
y2="245.495"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3747"
id="linearGradient3753"
x1="799.269"
x2="790.717"
y1="250.611"
y2="346.549"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3979"
id="linearGradient3985"
x1="443.115"
x2="478.897"
y1="426.194"
y2="396.978"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient4068"
id="linearGradient4074"
x1="511.032"
x2="463.191"
y1="481.892"
y2="347.412"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3135"
id="linearGradient3142"
x1="209.316"
x2="192.298"
y1="339.378"
y2="391.588"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3144"
id="linearGradient3150"
x1="207.218"
x2="198.619"
y1="344.353"
y2="385.231"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3226"
id="linearGradient3232"
x1="211.99"
x2="207.791"
y1="342.223"
y2="347.828"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3265"
id="linearGradient3272"
x1="203.117"
x2="216.366"
y1="349.285"
y2="354.39"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3276"
id="linearGradient3282"
x1="203.603"
x2="216.123"
y1="354.094"
y2="357.254"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3284"
id="linearGradient3290"
x1="183.48"
x2="162.625"
y1="437.745"
y2="366.921"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3328"
id="linearGradient3334"
x1="205.426"
x2="212.49"
y1="366.938"
y2="366.938"
gradientTransform="translate(-76.44 -98.427)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3346"
id="linearGradient3352"
x1="204.909"
x2="210.41"
y1="367.282"
y2="367.282"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3374"
id="linearGradient3380"
x1="167.644"
x2="159.87"
y1="395.646"
y2="392.552"
gradientTransform="translate(-77.697 -99.056)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3382"
id="linearGradient3388"
x1="155.133"
x2="180.155"
y1="377.425"
y2="387.051"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3401"
id="linearGradient3407"
x1="204.909"
x2="210.41"
y1="367.282"
y2="367.282"
gradientUnits="userSpaceOnUse"
></LinearGradient>
<LinearGradient
xlinkHref="#linearGradient3443"
id="linearGradient3449"
x1="197.689"
x2="187.375"
y1="388.727"
y2="372.397"
gradientTransform="translate(-78.385 -99.4)"
gradientUnits="userSpaceOnUse"
></Li
gitextract_95ou86zy/ ├── .changeset/ │ ├── README.md │ ├── config.json │ ├── dirty-rocks-jam.md │ ├── eighty-taxis-cross.md │ ├── five-rockets-battle.md │ └── pretty-carrots-obey.md ├── .gitattributes ├── .github/ │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ ├── no-response.yml │ └── workflows/ │ ├── main.yml │ └── release.yml ├── .gitignore ├── .husky/ │ └── pre-commit ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── babel.config.js ├── e2e/ │ ├── node-cjs/ │ │ ├── CHANGELOG.md │ │ ├── index.js │ │ └── package.json │ └── node-esm/ │ ├── CHANGELOG.md │ ├── index.js │ └── package.json ├── eslint.config.ts ├── lerna.json ├── package.json ├── packages/ │ ├── examples/ │ │ ├── dev.sh │ │ ├── next-14/ │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── README.md │ │ │ ├── app/ │ │ │ │ ├── globals.css │ │ │ │ ├── layout.js │ │ │ │ └── page.js │ │ │ ├── jsconfig.json │ │ │ ├── next.config.mjs │ │ │ ├── package.json │ │ │ ├── postcss.config.mjs │ │ │ └── tailwind.config.js │ │ ├── next-15/ │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── README.md │ │ │ ├── app/ │ │ │ │ ├── globals.css │ │ │ │ ├── layout.js │ │ │ │ └── page.js │ │ │ ├── jsconfig.json │ │ │ ├── next.config.mjs │ │ │ ├── package.json │ │ │ ├── postcss.config.mjs │ │ │ └── tailwind.config.js │ │ ├── package.json │ │ └── vite/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── declarations.d.ts │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src/ │ │ │ ├── examples/ │ │ │ │ ├── duplicated-images/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── ellipsis/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── emoji/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── font-family-fallback/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── font-weight/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── forms/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── fractals/ │ │ │ │ │ ├── Fractal.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── go-to/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── image-stress-test/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── jpg-orientation/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── knobs/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── link/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── media-queries/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── min-presence-ahead/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── multiline-text/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── object-fit/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── page-wrap/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── resume/ │ │ │ │ │ ├── Education.tsx │ │ │ │ │ ├── Experience.tsx │ │ │ │ │ ├── Header.tsx │ │ │ │ │ ├── List.tsx │ │ │ │ │ ├── Skills.tsx │ │ │ │ │ ├── Title.tsx │ │ │ │ │ └── index.tsx │ │ │ │ ├── soft-hyphens/ │ │ │ │ │ └── index.tsx │ │ │ │ ├── svg/ │ │ │ │ │ ├── Car.tsx │ │ │ │ │ ├── Heart.tsx │ │ │ │ │ ├── Pattern.tsx │ │ │ │ │ ├── Star.tsx │ │ │ │ │ ├── Svg1.tsx │ │ │ │ │ ├── Svg2.tsx │ │ │ │ │ ├── Svg4.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── svg.tsx │ │ │ │ ├── svg-transform/ │ │ │ │ │ └── index.tsx │ │ │ │ └── transform-origin/ │ │ │ │ └── index.tsx │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── index.tsx │ │ ├── tailwind.config.js │ │ └── vite.config.js │ ├── fns/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── adjust.ts │ │ │ ├── asyncCompose.ts │ │ │ ├── capitalize.ts │ │ │ ├── castArray.ts │ │ │ ├── compose.ts │ │ │ ├── dropLast.ts │ │ │ ├── evolve.ts │ │ │ ├── get.ts │ │ │ ├── index.ts │ │ │ ├── isNil.ts │ │ │ ├── last.ts │ │ │ ├── mapValues.ts │ │ │ ├── matchPercent.ts │ │ │ ├── omit.ts │ │ │ ├── parseFloat.ts │ │ │ ├── pick.ts │ │ │ ├── repeat.ts │ │ │ ├── reverse.ts │ │ │ ├── upperFirst.ts │ │ │ └── without.ts │ │ ├── tests/ │ │ │ ├── adjust.test.ts │ │ │ ├── asyncCompose.test.ts │ │ │ ├── capitalize.test.ts │ │ │ ├── castArray.test.ts │ │ │ ├── compose.test.ts │ │ │ ├── dropLast.test.ts │ │ │ ├── evolve.test.ts │ │ │ ├── get.test.ts │ │ │ ├── isNil.test.ts │ │ │ ├── last.test.ts │ │ │ ├── mapValues.test.ts │ │ │ ├── matchPercent.test.ts │ │ │ ├── omit.test.ts │ │ │ ├── parseFloat.test.ts │ │ │ ├── pick.test.ts │ │ │ ├── repeat.test.ts │ │ │ ├── reverse.test.ts │ │ │ ├── upperFirst.test.ts │ │ │ └── without.test.ts │ │ └── tsconfig.json │ ├── font/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── declarations.d.ts │ │ ├── globals.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── font-family.ts │ │ │ ├── font-source.ts │ │ │ ├── index.ts │ │ │ ├── standard-font.ts │ │ │ └── types.ts │ │ ├── tests/ │ │ │ ├── fallback-weights.test.ts │ │ │ ├── font-store.test.ts │ │ │ └── standard-fonts.test.ts │ │ └── tsconfig.json │ ├── image/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── declarations.d.ts │ │ ├── globals.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── cache.ts │ │ │ ├── index.ts │ │ │ ├── jpeg.ts │ │ │ ├── png.ts │ │ │ ├── resolve.ts │ │ │ └── types.ts │ │ ├── tests/ │ │ │ ├── cache.test.ts │ │ │ ├── resolve.test.ts │ │ │ └── types.ts │ │ ├── tsconfig.json │ │ ├── vitest.config.js │ │ └── vitest.setup.js │ ├── layout/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── globals.d.ts │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── setupTests.js │ │ ├── src/ │ │ │ ├── canvas/ │ │ │ │ └── measureCanvas.ts │ │ │ ├── image/ │ │ │ │ ├── fetchImage.ts │ │ │ │ ├── getRatio.ts │ │ │ │ ├── getSource.ts │ │ │ │ ├── measureImage.ts │ │ │ │ └── resolveSource.ts │ │ │ ├── index.ts │ │ │ ├── node/ │ │ │ │ ├── createInstances.ts │ │ │ │ ├── getBorderWidth.ts │ │ │ │ ├── getDimension.ts │ │ │ │ ├── getMargin.ts │ │ │ │ ├── getOrigin.ts │ │ │ │ ├── getPadding.ts │ │ │ │ ├── getPosition.ts │ │ │ │ ├── getWrap.ts │ │ │ │ ├── isFixed.ts │ │ │ │ ├── removePaddings.ts │ │ │ │ ├── setAlign.ts │ │ │ │ ├── setAlignContent.ts │ │ │ │ ├── setAlignItems.ts │ │ │ │ ├── setAlignSelf.ts │ │ │ │ ├── setAspectRatio.ts │ │ │ │ ├── setBorderWidth.ts │ │ │ │ ├── setDimension.ts │ │ │ │ ├── setDisplay.ts │ │ │ │ ├── setFlexBasis.ts │ │ │ │ ├── setFlexDirection.ts │ │ │ │ ├── setFlexGrow.ts │ │ │ │ ├── setFlexShrink.ts │ │ │ │ ├── setFlexWrap.ts │ │ │ │ ├── setGap.ts │ │ │ │ ├── setJustifyContent.ts │ │ │ │ ├── setMargin.ts │ │ │ │ ├── setOverflow.ts │ │ │ │ ├── setPadding.ts │ │ │ │ ├── setPosition.ts │ │ │ │ ├── setPositionType.ts │ │ │ │ ├── setYogaValue.ts │ │ │ │ ├── shouldBreak.ts │ │ │ │ └── splitNode.ts │ │ │ ├── page/ │ │ │ │ ├── getContentArea.ts │ │ │ │ ├── getOrientation.ts │ │ │ │ ├── getSize.ts │ │ │ │ ├── getWrapArea.ts │ │ │ │ ├── isHeightAuto.ts │ │ │ │ ├── isLandscape.ts │ │ │ │ └── isPortrait.ts │ │ │ ├── steps/ │ │ │ │ ├── resolveAssets.ts │ │ │ │ ├── resolveBookmarks.ts │ │ │ │ ├── resolveDimensions.ts │ │ │ │ ├── resolveInheritance.ts │ │ │ │ ├── resolveLinkSubstitution.ts │ │ │ │ ├── resolveOrigins.ts │ │ │ │ ├── resolvePagePaddings.ts │ │ │ │ ├── resolvePageSizes.ts │ │ │ │ ├── resolvePagination.ts │ │ │ │ ├── resolvePercentHeight.ts │ │ │ │ ├── resolvePercentRadius.ts │ │ │ │ ├── resolveStyles.ts │ │ │ │ ├── resolveSvg.ts │ │ │ │ ├── resolveTextLayout.ts │ │ │ │ ├── resolveYoga.ts │ │ │ │ └── resolveZIndex.ts │ │ │ ├── svg/ │ │ │ │ ├── getContainer.ts │ │ │ │ ├── getDefs.ts │ │ │ │ ├── inheritProps.ts │ │ │ │ ├── layoutText.ts │ │ │ │ ├── measureSvg.ts │ │ │ │ ├── parseAspectRatio.ts │ │ │ │ ├── parseViewbox.ts │ │ │ │ └── replaceDefs.ts │ │ │ ├── text/ │ │ │ │ ├── emoji.ts │ │ │ │ ├── getAttributedString.ts │ │ │ │ ├── heightAtLineIndex.ts │ │ │ │ ├── ignoreChars.ts │ │ │ │ ├── layoutText.ts │ │ │ │ ├── lineIndexAtHeight.ts │ │ │ │ ├── linesHeight.ts │ │ │ │ ├── linesWidth.ts │ │ │ │ ├── measureText.ts │ │ │ │ ├── splitText.ts │ │ │ │ └── transformText.ts │ │ │ ├── types/ │ │ │ │ ├── base.ts │ │ │ │ ├── canvas.ts │ │ │ │ ├── checkbox.ts │ │ │ │ ├── circle.ts │ │ │ │ ├── clip-path.ts │ │ │ │ ├── defs.ts │ │ │ │ ├── document.ts │ │ │ │ ├── ellipse.ts │ │ │ │ ├── field-set.ts │ │ │ │ ├── g.ts │ │ │ │ ├── image.ts │ │ │ │ ├── index.ts │ │ │ │ ├── line.ts │ │ │ │ ├── linear-gradient.ts │ │ │ │ ├── link.ts │ │ │ │ ├── node.ts │ │ │ │ ├── note.ts │ │ │ │ ├── page.ts │ │ │ │ ├── path.ts │ │ │ │ ├── polygon.ts │ │ │ │ ├── polyline.ts │ │ │ │ ├── radial-gradient.ts │ │ │ │ ├── rect.ts │ │ │ │ ├── select.ts │ │ │ │ ├── stop.ts │ │ │ │ ├── svg.ts │ │ │ │ ├── text-input.ts │ │ │ │ ├── text-instance.ts │ │ │ │ ├── text.ts │ │ │ │ ├── tspan.ts │ │ │ │ └── view.ts │ │ │ └── yoga/ │ │ │ └── index.ts │ │ ├── tests/ │ │ │ ├── image/ │ │ │ │ ├── getSource.test.ts │ │ │ │ └── resolveSource.test.ts │ │ │ ├── node/ │ │ │ │ ├── getBorderWidth.test.ts │ │ │ │ ├── getDimension.test.ts │ │ │ │ ├── getMargin.test.ts │ │ │ │ ├── getOrigin.test.ts │ │ │ │ ├── getPadding.test.ts │ │ │ │ ├── getPosition.test.ts │ │ │ │ ├── removePaddings.test.ts │ │ │ │ ├── setAlignContent.test.ts │ │ │ │ ├── setAlignItems.test.ts │ │ │ │ ├── setAlignSelf.test.ts │ │ │ │ ├── setAspectRatio.test.ts │ │ │ │ ├── setBorderWidth.test.ts │ │ │ │ ├── setDimension.test.ts │ │ │ │ ├── setDisplay.test.ts │ │ │ │ ├── setFlexBasis.test.ts │ │ │ │ ├── setFlexDirection.test.ts │ │ │ │ ├── setFlexGrow.test.ts │ │ │ │ ├── setFlexShrink.test.ts │ │ │ │ ├── setFlexWrap.test.ts │ │ │ │ ├── setGap.test.ts │ │ │ │ ├── setJustifyContent.test.ts │ │ │ │ ├── setMargin.test.ts │ │ │ │ ├── setOverflow.test.ts │ │ │ │ ├── setPadding.test.ts │ │ │ │ ├── setPosition.test.ts │ │ │ │ ├── setPositionType.test.ts │ │ │ │ └── shouldBreak.test.ts │ │ │ ├── page/ │ │ │ │ ├── getOrientation.test.ts │ │ │ │ ├── getSize.test.ts │ │ │ │ ├── isHeightAuto.test.ts │ │ │ │ ├── isLandscape.test.ts │ │ │ │ └── isPortrait.test.ts │ │ │ ├── steps/ │ │ │ │ ├── __snapshots__/ │ │ │ │ │ ├── resolveLinkSubstitution.test.ts.snap │ │ │ │ │ ├── resolveOrigins.test.ts.snap │ │ │ │ │ ├── resolvePagePaddings.test.ts.snap │ │ │ │ │ ├── resolvePercentHeight.test.ts.snap │ │ │ │ │ └── resolveStyles.test.ts.snap │ │ │ │ ├── resolveBookmarks.test.ts │ │ │ │ ├── resolveInhritance.test.ts │ │ │ │ ├── resolveLinkSubstitution.test.ts │ │ │ │ ├── resolveOrigins.test.ts │ │ │ │ ├── resolvePagePaddings.test.ts │ │ │ │ ├── resolvePageSizes.test.ts │ │ │ │ ├── resolvePagination.test.ts │ │ │ │ ├── resolvePercentHeight.test.ts │ │ │ │ ├── resolveStyles.test.ts │ │ │ │ ├── resolveSvg.test.ts │ │ │ │ └── resolveTextLayout.test.ts │ │ │ └── text/ │ │ │ ├── heightAtLineIndex.test.ts │ │ │ ├── layoutText.test.ts │ │ │ ├── lineIndexAtHeight.test.ts │ │ │ └── measureText.test.ts │ │ └── tsconfig.json │ ├── pdfkit/ │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── abstract_reference.js │ │ │ ├── data.js │ │ │ ├── document.js │ │ │ ├── font/ │ │ │ │ ├── afm.js │ │ │ │ ├── data/ │ │ │ │ │ ├── Courier-Bold.afm │ │ │ │ │ ├── Courier-BoldOblique.afm │ │ │ │ │ ├── Courier-Oblique.afm │ │ │ │ │ ├── Courier.afm │ │ │ │ │ ├── Helvetica-Bold.afm │ │ │ │ │ ├── Helvetica-BoldOblique.afm │ │ │ │ │ ├── Helvetica-Oblique.afm │ │ │ │ │ ├── Helvetica.afm │ │ │ │ │ ├── Times-Bold.afm │ │ │ │ │ ├── Times-BoldItalic.afm │ │ │ │ │ ├── Times-Italic.afm │ │ │ │ │ ├── Times-Roman.afm │ │ │ │ │ ├── compressData.js │ │ │ │ │ └── expandData.js │ │ │ │ ├── embedded.js │ │ │ │ └── standard.js │ │ │ ├── font.js │ │ │ ├── font_factory.js │ │ │ ├── gradient.js │ │ │ ├── image/ │ │ │ │ ├── jpeg.js │ │ │ │ └── png.js │ │ │ ├── image.js │ │ │ ├── index.js │ │ │ ├── line_wrapper.js │ │ │ ├── metadata.js │ │ │ ├── mixins/ │ │ │ │ ├── acroform.js │ │ │ │ ├── annotations.js │ │ │ │ ├── attachments.js │ │ │ │ ├── color.js │ │ │ │ ├── fonts.js │ │ │ │ ├── images.js │ │ │ │ ├── markings.js │ │ │ │ ├── metadata.js │ │ │ │ ├── outline.js │ │ │ │ ├── pdfa.js │ │ │ │ ├── pdfua.js │ │ │ │ ├── subsets.js │ │ │ │ ├── text.js │ │ │ │ └── vector.js │ │ │ ├── name_tree.js │ │ │ ├── number_tree.js │ │ │ ├── object.js │ │ │ ├── outline.js │ │ │ ├── page.js │ │ │ ├── path.js │ │ │ ├── pattern.js │ │ │ ├── reference.js │ │ │ ├── security.js │ │ │ ├── spotcolor.js │ │ │ ├── structure_content.js │ │ │ ├── structure_element.js │ │ │ ├── tree.js │ │ │ ├── utils/ │ │ │ │ └── range.js │ │ │ ├── utils.js │ │ │ └── virtual-fs.js │ │ └── tests/ │ │ └── font/ │ │ └── standard.test.ts │ ├── png-js/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ └── src/ │ │ └── index.js │ ├── primitives/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ └── index.ts │ │ ├── tests/ │ │ │ └── index.test.ts │ │ └── tsconfig.json │ ├── reconciler/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── build/ │ │ │ └── trim-reconciler.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── propsEqual.ts │ │ │ ├── reconciler-23.ts │ │ │ ├── reconciler-31.ts │ │ │ ├── reconciler-33.ts │ │ │ └── types.ts │ │ ├── tests/ │ │ │ └── propsEqual.test.ts │ │ └── tsconfig.json │ ├── render/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── globals.d.ts │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── operations/ │ │ │ │ ├── addBookmarks.ts │ │ │ │ ├── clipNode.ts │ │ │ │ ├── embedImage.ts │ │ │ │ ├── setDestination.ts │ │ │ │ ├── setLink.ts │ │ │ │ └── transform.ts │ │ │ ├── primitives/ │ │ │ │ ├── renderBackground.ts │ │ │ │ ├── renderBorders.ts │ │ │ │ ├── renderCanvas.ts │ │ │ │ ├── renderCheckbox.ts │ │ │ │ ├── renderCircle.ts │ │ │ │ ├── renderDebug.ts │ │ │ │ ├── renderEllipse.ts │ │ │ │ ├── renderFieldSet.ts │ │ │ │ ├── renderGlyphs.ts │ │ │ │ ├── renderGroup.ts │ │ │ │ ├── renderImage.ts │ │ │ │ ├── renderLine.ts │ │ │ │ ├── renderList.ts │ │ │ │ ├── renderNode.ts │ │ │ │ ├── renderNote.ts │ │ │ │ ├── renderPage.ts │ │ │ │ ├── renderPath.ts │ │ │ │ ├── renderPolygon.ts │ │ │ │ ├── renderPolyline.ts │ │ │ │ ├── renderRect.ts │ │ │ │ ├── renderSelect.ts │ │ │ │ ├── renderSvg.ts │ │ │ │ ├── renderSvgImage.ts │ │ │ │ ├── renderSvgText.ts │ │ │ │ ├── renderText.ts │ │ │ │ └── renderTextInput.ts │ │ │ ├── svg/ │ │ │ │ ├── getBoundingBox.ts │ │ │ │ └── parsePoints.ts │ │ │ ├── types.ts │ │ │ └── utils/ │ │ │ ├── parseColor.ts │ │ │ ├── parseFormOptions.ts │ │ │ └── resolveObjectFit.ts │ │ ├── tests/ │ │ │ ├── ctx.ts │ │ │ ├── operations/ │ │ │ │ └── setDestination.test.ts │ │ │ ├── primitives/ │ │ │ │ ├── renderBackground.test.ts │ │ │ │ ├── renderCanvas.test.ts │ │ │ │ ├── renderCircle.test.ts │ │ │ │ ├── renderEllipse.test.ts │ │ │ │ └── renderForm.test.ts │ │ │ ├── svg/ │ │ │ │ ├── getBoundingBox.test.ts │ │ │ │ └── parsePoints.test.ts │ │ │ └── utils/ │ │ │ ├── objectFit.test.ts │ │ │ └── parseColor.test.ts │ │ └── tsconfig.json │ ├── renderer/ │ │ ├── .gitignore │ │ ├── .size-limit.cjs │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── index.d.ts │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── dom/ │ │ │ │ ├── BlobProvider.js │ │ │ │ ├── PDFDownloadLink.js │ │ │ │ ├── PDFViewer.js │ │ │ │ ├── index.js │ │ │ │ └── usePDF.js │ │ │ ├── index.js │ │ │ ├── node/ │ │ │ │ ├── index.js │ │ │ │ └── renderTo.js │ │ │ ├── renderer.js │ │ │ └── utils.js │ │ ├── tests/ │ │ │ ├── components.test.jsx │ │ │ ├── debug.test.jsx │ │ │ ├── dom.test.jsx │ │ │ ├── emoji.test.jsx │ │ │ ├── environment/ │ │ │ │ └── jsdom.js │ │ │ ├── flex.test.jsx │ │ │ ├── gap.test.jsx │ │ │ ├── images.test.jsx │ │ │ ├── link.test.jsx │ │ │ ├── namedDestinations.test.jsx │ │ │ ├── node.test.jsx │ │ │ ├── orphanTexts.test.jsx │ │ │ ├── pageWrap.test.jsx │ │ │ ├── renderComponent.js │ │ │ ├── resume.test.jsx │ │ │ ├── svg.test.jsx │ │ │ ├── svgs.jsx │ │ │ ├── text.test.jsx │ │ │ ├── transform.test.jsx │ │ │ └── usePDF.test.jsx │ │ ├── vitest.browser.config.js │ │ ├── vitest.config.js │ │ └── vitest.setup.js │ ├── stylesheet/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── globals.d.ts │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── flatten/ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── mediaQueries/ │ │ │ │ └── index.ts │ │ │ ├── resolve/ │ │ │ │ ├── borders.ts │ │ │ │ ├── boxModel.ts │ │ │ │ ├── colors.ts │ │ │ │ ├── dimensions.ts │ │ │ │ ├── flex.ts │ │ │ │ ├── gap.ts │ │ │ │ ├── index.ts │ │ │ │ ├── layout.ts │ │ │ │ ├── margins.ts │ │ │ │ ├── paddings.ts │ │ │ │ ├── positioning.ts │ │ │ │ ├── svg.ts │ │ │ │ ├── text.ts │ │ │ │ ├── transform.ts │ │ │ │ └── utils.ts │ │ │ ├── types.ts │ │ │ └── utils/ │ │ │ ├── castFloat.ts │ │ │ ├── castInt.ts │ │ │ ├── colors.ts │ │ │ ├── offsetKeyword.ts │ │ │ └── units.ts │ │ ├── tests/ │ │ │ ├── borders.test.ts │ │ │ ├── colors.test.ts │ │ │ ├── dimensions.test.ts │ │ │ ├── flatten.test.ts │ │ │ ├── flex.test.ts │ │ │ ├── gap.test.ts │ │ │ ├── layout.test.ts │ │ │ ├── margins.test.ts │ │ │ ├── mediaQueries.test.ts │ │ │ ├── paddings.test.ts │ │ │ ├── positioning.test.ts │ │ │ ├── resolve.test.ts │ │ │ ├── text.test.ts │ │ │ └── transform.test.ts │ │ └── tsconfig.json │ ├── textkit/ │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── attributedString/ │ │ │ │ ├── advanceWidth.ts │ │ │ │ ├── advanceWidthBetween.ts │ │ │ │ ├── append.ts │ │ │ │ ├── ascent.ts │ │ │ │ ├── descent.ts │ │ │ │ ├── dropLast.ts │ │ │ │ ├── empty.ts │ │ │ │ ├── end.ts │ │ │ │ ├── fromFragments.ts │ │ │ │ ├── glyphWidthAt.ts │ │ │ │ ├── height.ts │ │ │ │ ├── indexAtOffset.ts │ │ │ │ ├── insertGlyph.ts │ │ │ │ ├── leadingOffset.ts │ │ │ │ ├── length.ts │ │ │ │ ├── prepend.ts │ │ │ │ ├── runAt.ts │ │ │ │ ├── runIndexAt.ts │ │ │ │ ├── slice.ts │ │ │ │ ├── sliceAtOffset.ts │ │ │ │ ├── start.ts │ │ │ │ ├── trailingOffset.ts │ │ │ │ └── trim.ts │ │ │ ├── engines/ │ │ │ │ ├── bidi/ │ │ │ │ │ └── index.ts │ │ │ │ ├── fontSubstitution/ │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── justification/ │ │ │ │ │ ├── getDistances.ts │ │ │ │ │ ├── getFactors.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── linebreaker/ │ │ │ │ │ ├── bestFit.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── knuthPlass.ts │ │ │ │ │ ├── linkedList.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── scriptItemizer/ │ │ │ │ │ └── index.ts │ │ │ │ ├── textDecoration/ │ │ │ │ │ └── index.ts │ │ │ │ └── wordHyphenation/ │ │ │ │ └── index.ts │ │ │ ├── glyph/ │ │ │ │ ├── fromCodePoint.ts │ │ │ │ ├── isWhiteSpace.ts │ │ │ │ └── slice.ts │ │ │ ├── index.ts │ │ │ ├── indices/ │ │ │ │ ├── append.ts │ │ │ │ ├── normalize.ts │ │ │ │ ├── prepend.ts │ │ │ │ └── resolve.ts │ │ │ ├── layout/ │ │ │ │ ├── applyDefaultStyles.ts │ │ │ │ ├── bidiMirroring.ts │ │ │ │ ├── bidiReordering.ts │ │ │ │ ├── finalizeFragments.ts │ │ │ │ ├── generateGlyphs.ts │ │ │ │ ├── generateLineRects.ts │ │ │ │ ├── index.ts │ │ │ │ ├── layoutParagraph.ts │ │ │ │ ├── preprocessRuns.ts │ │ │ │ ├── resolveAttachments.ts │ │ │ │ ├── resolveYOffset.ts │ │ │ │ ├── splitParagraphs.ts │ │ │ │ ├── typesetter.ts │ │ │ │ ├── verticalAlign.ts │ │ │ │ └── wrapWords.ts │ │ │ ├── paragraph/ │ │ │ │ ├── height.ts │ │ │ │ ├── sliceAtHeight.ts │ │ │ │ └── truncate.ts │ │ │ ├── positions/ │ │ │ │ └── advanceWidth.ts │ │ │ ├── rect/ │ │ │ │ ├── area.ts │ │ │ │ ├── bottomLeft.ts │ │ │ │ ├── bottomRight.ts │ │ │ │ ├── copy.ts │ │ │ │ ├── crop.ts │ │ │ │ ├── empty.ts │ │ │ │ ├── equals.ts │ │ │ │ ├── intersects.ts │ │ │ │ ├── maxX.ts │ │ │ │ ├── maxY.ts │ │ │ │ └── partition.ts │ │ │ ├── run/ │ │ │ │ ├── add.ts │ │ │ │ ├── advanceWidth.ts │ │ │ │ ├── advanceWidthBetween.ts │ │ │ │ ├── append.ts │ │ │ │ ├── ascent.ts │ │ │ │ ├── concat.ts │ │ │ │ ├── descent.ts │ │ │ │ ├── dropLast.ts │ │ │ │ ├── empty.ts │ │ │ │ ├── filter.ts │ │ │ │ ├── flatten.ts │ │ │ │ ├── getFont.ts │ │ │ │ ├── glyphIndexAt.ts │ │ │ │ ├── height.ts │ │ │ │ ├── indexAtOffset.ts │ │ │ │ ├── insert.ts │ │ │ │ ├── isEmpty.ts │ │ │ │ ├── isWhiteSpace.ts │ │ │ │ ├── leadingOffset.ts │ │ │ │ ├── length.ts │ │ │ │ ├── lineGap.ts │ │ │ │ ├── offset.ts │ │ │ │ ├── omit.ts │ │ │ │ ├── prepend.ts │ │ │ │ ├── runIndexAt.ts │ │ │ │ ├── scale.ts │ │ │ │ ├── slice.ts │ │ │ │ ├── sort.ts │ │ │ │ ├── subtract.ts │ │ │ │ └── trailingOffset.ts │ │ │ ├── types.ts │ │ │ └── utils/ │ │ │ ├── isNumber.ts │ │ │ └── stringFromCodePoints.ts │ │ ├── tests/ │ │ │ ├── attributedString/ │ │ │ │ ├── advanceWidth.test.ts │ │ │ │ ├── advanceWidthBetween.test.ts │ │ │ │ ├── append.test.ts │ │ │ │ ├── ascent.test.ts │ │ │ │ ├── descent.test.ts │ │ │ │ ├── dropLast.test.ts │ │ │ │ ├── empty.test.ts │ │ │ │ ├── end.test.ts │ │ │ │ ├── fromFragments.test.ts │ │ │ │ ├── height.test.ts │ │ │ │ ├── indexAtOffset.test.ts │ │ │ │ ├── insertGlyph.test.ts │ │ │ │ ├── leadingOffset.test.ts │ │ │ │ ├── length.test.ts │ │ │ │ ├── prepend.test.ts │ │ │ │ ├── runAt.test.ts │ │ │ │ ├── runIndexAt.test.ts │ │ │ │ ├── slice.test.ts │ │ │ │ ├── sliceAtOffset.test.ts │ │ │ │ ├── start.test.ts │ │ │ │ ├── trailingOffset.test.ts │ │ │ │ └── trim.test.ts │ │ │ ├── engines/ │ │ │ │ ├── bidi.test.ts │ │ │ │ ├── fontSubstitution.test.ts │ │ │ │ ├── linebreaker.test.ts │ │ │ │ ├── scriptItemizer.test.ts │ │ │ │ └── wordHyphenation.test.ts │ │ │ ├── glyph/ │ │ │ │ ├── fromCodePoint.test.ts │ │ │ │ ├── isWhiteSpace.test.ts │ │ │ │ └── slice.test.ts │ │ │ ├── indices/ │ │ │ │ ├── append.test.ts │ │ │ │ ├── normalize.test.ts │ │ │ │ ├── prepend.test.ts │ │ │ │ └── resolve.test.ts │ │ │ ├── internal/ │ │ │ │ ├── bidiEngine.ts │ │ │ │ ├── font.ts │ │ │ │ ├── fontSubstitutionEngine.ts │ │ │ │ ├── pluck.ts │ │ │ │ └── scriptItemizer.ts │ │ │ ├── layout/ │ │ │ │ ├── applyDefaultStyles.test.ts │ │ │ │ ├── bidiMirroring.test.ts │ │ │ │ ├── bidiReordering.test.ts │ │ │ │ ├── generateGlyphs.test.ts │ │ │ │ ├── layoutParagraph.test.ts │ │ │ │ ├── preprocessRuns.test.ts │ │ │ │ ├── resolveAttachments.test.ts │ │ │ │ ├── resolveYOffset.test.ts │ │ │ │ ├── splitParagraphs.test.ts │ │ │ │ ├── verticalAlign.test.ts │ │ │ │ └── wrapWords.test.ts │ │ │ ├── rect/ │ │ │ │ ├── area.test.ts │ │ │ │ ├── bottomLeft.test.ts │ │ │ │ ├── bottomRight.test.ts │ │ │ │ ├── copy.test.ts │ │ │ │ ├── crop.test.ts │ │ │ │ ├── empty.test.ts │ │ │ │ ├── equals.test.ts │ │ │ │ ├── intersects.test.ts │ │ │ │ ├── maxX.test.ts │ │ │ │ ├── maxY.test.ts │ │ │ │ └── partition.test.ts │ │ │ ├── run/ │ │ │ │ ├── add.test.ts │ │ │ │ ├── advanceWidth.test.ts │ │ │ │ ├── advanceWidthBetween.test.ts │ │ │ │ ├── append.test.ts │ │ │ │ ├── ascent.test.ts │ │ │ │ ├── concat.test.ts │ │ │ │ ├── descent.test.ts │ │ │ │ ├── dropLast.test.ts │ │ │ │ ├── empty.test.ts │ │ │ │ ├── filter.test.ts │ │ │ │ ├── flatten.test.ts │ │ │ │ ├── getFont.test.ts │ │ │ │ ├── glyphIndexAt.test.ts │ │ │ │ ├── height.test.ts │ │ │ │ ├── indexAtOffset.test.ts │ │ │ │ ├── insert.test.ts │ │ │ │ ├── isEmpty.test.ts │ │ │ │ ├── leadingOffset.test.ts │ │ │ │ ├── length.test.ts │ │ │ │ ├── lineGap.test.ts │ │ │ │ ├── offset.test.ts │ │ │ │ ├── omit.test.ts │ │ │ │ ├── prepend.test.ts │ │ │ │ ├── runIndexAt.test.ts │ │ │ │ ├── scale.test.ts │ │ │ │ ├── slice.test.ts │ │ │ │ ├── sort.test.ts │ │ │ │ ├── subtract.test.ts │ │ │ │ └── trailingOffset.test.ts │ │ │ └── utils/ │ │ │ ├── isNumber.test.ts │ │ │ └── stringFromCodePoints.test.ts │ │ └── tsconfig.json │ └── types/ │ ├── CHANGELOG.md │ ├── README.md │ ├── bookmark.d.ts │ ├── context.d.ts │ ├── font.d.ts │ ├── image.d.ts │ ├── index.d.ts │ ├── node.d.ts │ ├── package.json │ ├── page.d.ts │ ├── pdf.d.ts │ ├── primitive.d.ts │ ├── style.d.ts │ └── svg.d.ts ├── vitest.config.js └── vitest.workspace.js
SYMBOL INDEX (1021 symbols across 196 files)
FILE: e2e/node-cjs/index.js
function removeMovingParts (line 17) | function removeMovingParts(buffer) {
FILE: e2e/node-esm/index.js
function removeMovingParts (line 17) | function removeMovingParts(buffer) {
FILE: packages/examples/next-14/app/layout.js
function RootLayout (line 8) | function RootLayout({ children }) {
FILE: packages/examples/next-14/app/page.js
function Home (line 11) | function Home() {
FILE: packages/examples/next-15/app/layout.js
function RootLayout (line 8) | function RootLayout({ children }) {
FILE: packages/examples/next-15/app/page.js
function Home (line 11) | function Home() {
FILE: packages/examples/vite/src/examples/image-stress-test/index.tsx
constant IMAGES (line 4) | const IMAGES = [
FILE: packages/examples/vite/src/examples/index.ts
constant EXAMPLES (line 24) | const EXAMPLES = [
FILE: packages/examples/vite/src/examples/resume/index.tsx
constant IMAGE_SRC (line 79) | const IMAGE_SRC =
FILE: packages/examples/vite/src/examples/svg-transform/index.tsx
constant COLORS (line 4) | const COLORS = ['red', 'green', 'blue', 'yellow', 'purple'];
FILE: packages/examples/vite/src/index.tsx
constant MOUNT_ELEMENT (line 53) | const MOUNT_ELEMENT = document.createElement('div');
FILE: packages/fns/src/asyncCompose.ts
type Fn (line 3) | type Fn = (arg: any, ...args: any[]) => Promise<any> | any;
type ComposedInput (line 5) | type ComposedInput<T extends Fn[]> = T extends [
type ComposedOutput (line 12) | type ComposedOutput<T extends Fn[]> = T extends [
FILE: packages/fns/src/compose.ts
type Fn (line 1) | type Fn = (arg: any, ...args: any[]) => any;
type ComposedInput (line 3) | type ComposedInput<T extends Fn[]> = T extends [
type ComposedOutput (line 10) | type ComposedOutput<T extends Fn[]> = T extends [
FILE: packages/fns/src/dropLast.ts
function dropLast (line 9) | function dropLast<T>(value: string | T[]): string | T[] {
FILE: packages/fns/src/evolve.ts
function evolve (line 12) | function evolve<T extends Record<string, any>>(
FILE: packages/fns/src/last.ts
function last (line 15) | function last(value: string | any[]): any {
FILE: packages/fns/src/mapValues.ts
type IteratorFn (line 1) | type IteratorFn = (value: any, key: string, index: number) => any;
FILE: packages/fns/src/matchPercent.ts
type PercentMatch (line 1) | interface PercentMatch {
constant PERCENT_REGEX (line 6) | const PERCENT_REGEX = /(-?\d+\.?\d*)%/;
FILE: packages/font/src/font-family.ts
constant FONT_WEIGHTS (line 4) | const FONT_WEIGHTS = {
class FontFamily (line 28) | class FontFamily {
method create (line 32) | static create(family: string) {
method constructor (line 36) | constructor(family: string) {
method register (line 41) | register({
method resolve (line 56) | resolve(descriptor: FontDescriptor) {
FILE: packages/font/src/font-source.ts
class FontSource (line 32) | class FontSource {
method constructor (line 41) | constructor(
method _load (line 58) | async _load(): Promise<void> {
method load (line 88) | async load() {
FILE: packages/font/src/index.ts
class FontStore (line 11) | class FontStore {
method constructor (line 16) | constructor() {
type FontStoreType (line 205) | type FontStoreType = FontStore;
FILE: packages/font/src/standard-font.ts
constant STANDARD_FONTS (line 6) | const STANDARD_FONTS = [
class StandardFont (line 21) | class StandardFont implements Font {
method constructor (line 41) | constructor(src: string) {
method encode (line 63) | encode(str: string) {
method layout (line 67) | layout(str: string) {
method glyphForCodePoint (line 95) | glyphForCodePoint(codePoint: number) {
method getGlyph (line 101) | getGlyph(id: number): fontkit.Glyph {
method hasGlyphForCodePoint (line 113) | hasGlyphForCodePoint(codePoint: number) {
method ascent (line 118) | get ascent() {
method capHeight (line 123) | get capHeight() {
method xHeight (line 141) | get xHeight() {
method descent (line 159) | get descent() {
method lineGap (line 176) | get lineGap() {
method unitsPerEm (line 180) | get unitsPerEm() {
method stringsForGlyph (line 184) | stringsForGlyph(): string[] {
method glyphsForString (line 188) | glyphsForString(): fontkit.Glyph[] {
method widthOfGlyph (line 192) | widthOfGlyph(): number {
method getAvailableFeatures (line 196) | getAvailableFeatures(): string[] {
method createSubset (line 200) | createSubset(): fontkit.Subset {
method getVariation (line 204) | getVariation(): any {
method getFont (line 208) | getFont(): any {
method getName (line 212) | getName(): string | null {
method setDefaultLanguage (line 216) | setDefaultLanguage(): void {
FILE: packages/font/src/types.ts
type Font (line 3) | type Font = Omit<fontkit.Font, 'type'> & {
type FontStyle (line 8) | type FontStyle = 'normal' | 'italic' | 'oblique';
type FontWeight (line 10) | type FontWeight =
type FontDescriptor (line 27) | type FontDescriptor = {
type RemoteOptions (line 33) | type RemoteOptions = {
type FontSourceOptions (line 39) | type FontSourceOptions = {
type FontSource (line 43) | type FontSource = {
type SingleLoad (line 49) | type SingleLoad = {
type BulkLoad (line 53) | type BulkLoad = {
type EmojiSourceUrl (line 58) | interface EmojiSourceUrl {
type EmojiSourceBuilder (line 64) | interface EmojiSourceBuilder {
type EmojiSource (line 69) | type EmojiSource = EmojiSourceUrl | EmojiSourceBuilder;
type HyphenationCallback (line 71) | type HyphenationCallback = (word: string) => string[];
FILE: packages/image/declarations.d.ts
class PNG (line 7) | class PNG {
FILE: packages/image/src/jpeg.ts
class JPEG (line 5) | class JPEG implements Image {
method constructor (line 11) | constructor(data: Buffer) {
method isValid (line 43) | static isValid(data: Buffer) {
FILE: packages/image/src/png.ts
class PNG (line 5) | class PNG implements Image {
method constructor (line 11) | constructor(data: Buffer) {
method isValid (line 20) | static isValid(data: Buffer): boolean {
FILE: packages/image/src/resolve.ts
constant IMAGE_CACHE (line 18) | const IMAGE_CACHE = createCache<Promise<Image | null>>({ limit: 30 });
function getImage (line 111) | function getImage(body: Buffer, format: string): Image | null {
FILE: packages/image/src/types.ts
type Image (line 1) | interface Image {
type ImageFormat (line 9) | type ImageFormat = 'jpg' | 'jpeg' | 'png';
type DataImageSrc (line 11) | type DataImageSrc = {
type LocalImageSrc (line 16) | type LocalImageSrc = {
type RemoteImageSrc (line 21) | type RemoteImageSrc = {
type Base64ImageSrc (line 30) | type Base64ImageSrc = {
type ImageSrc (line 34) | type ImageSrc =
FILE: packages/image/tests/types.ts
type Global (line 11) | interface Global {
type GlobalWithFetchMock (line 17) | interface GlobalWithFetchMock extends Global {
type FetchMock (line 22) | interface FetchMock
type MockParams (line 54) | interface MockParams {
type MockResponseInit (line 63) | interface MockResponseInit extends MockParams {
type ErrorOrFunction (line 68) | type ErrorOrFunction = Error | ((...args: any[]) => Promise<any>);
type UrlOrPredicate (line 69) | type UrlOrPredicate = string | RegExp | ((input: Request) => boolean);
type MockResponseInitFunction (line 71) | type MockResponseInitFunction = (
FILE: packages/layout/globals.d.ts
type Align (line 2) | enum Align {
type BoxSizing (line 14) | enum BoxSizing {
type Dimension (line 19) | enum Dimension {
type Direction (line 24) | enum Direction {
type Display (line 30) | enum Display {
type Edge (line 36) | enum Edge {
type Errata (line 48) | enum Errata {
type ExperimentalFeature (line 57) | enum ExperimentalFeature {
type FlexDirection (line 61) | enum FlexDirection {
type Gutter (line 68) | enum Gutter {
type Justify (line 74) | enum Justify {
type LogLevel (line 83) | enum LogLevel {
type MeasureMode (line 92) | enum MeasureMode {
type NodeType (line 98) | enum NodeType {
type Overflow (line 103) | enum Overflow {
type PositionType (line 109) | enum PositionType {
type Unit (line 115) | enum Unit {
type Wrap (line 122) | enum Wrap {
type MeasureFunction (line 128) | type MeasureFunction = (
type YogaNode (line 138) | interface YogaNode {
type YogaConfig (line 223) | interface YogaConfig {
type ConfigStatic (line 227) | interface ConfigStatic {
type NodeStatic (line 232) | interface NodeStatic {
type Yoga (line 239) | interface Yoga {
FILE: packages/layout/src/canvas/measureCanvas.ts
constant SAFETY_HEIGHT (line 8) | const SAFETY_HEIGHT = 10;
type Point (line 10) | type Point = [number, number];
FILE: packages/layout/src/image/measureImage.ts
constant SAFETY_HEIGHT (line 9) | const SAFETY_HEIGHT = 10;
FILE: packages/layout/src/node/getDimension.ts
constant DEFAULT_DIMENSION (line 3) | const DEFAULT_DIMENSION = {
FILE: packages/layout/src/node/getWrap.ts
constant NON_WRAP_TYPES (line 4) | const NON_WRAP_TYPES = [P.Svg, P.Note, P.Image, P.Canvas];
FILE: packages/layout/src/node/removePaddings.ts
constant PADDING_PROPS (line 6) | const PADDING_PROPS = [
FILE: packages/layout/src/node/setAlign.ts
constant ALIGN (line 5) | const ALIGN = {
FILE: packages/layout/src/node/setFlexDirection.ts
constant FLEX_DIRECTIONS (line 5) | const FLEX_DIRECTIONS = {
FILE: packages/layout/src/node/setFlexWrap.ts
constant FLEX_WRAP (line 4) | const FLEX_WRAP = {
FILE: packages/layout/src/node/setJustifyContent.ts
constant JUSTIFY_CONTENT (line 5) | const JUSTIFY_CONTENT = {
FILE: packages/layout/src/node/setOverflow.ts
constant OVERFLOW (line 5) | const OVERFLOW = {
FILE: packages/layout/src/node/setPositionType.ts
constant POSITION (line 5) | const POSITION = {
FILE: packages/layout/src/page/getOrientation.ts
constant VALID_ORIENTATIONS (line 3) | const VALID_ORIENTATIONS = ['portrait', 'landscape'];
FILE: packages/layout/src/page/getSize.ts
type UnitSize (line 4) | type UnitSize = { width: string | number; height?: string | number };
type Size (line 6) | type Size = { width: number; height: number };
constant PAGE_SIZES (line 9) | const PAGE_SIZES = {
FILE: packages/layout/src/steps/resolveBookmarks.ts
type Parent (line 9) | type Parent = Bookmark & { ref: number; parent: number | null };
type Item (line 11) | type Item = {
FILE: packages/layout/src/steps/resolveInheritance.ts
type StyleKey (line 7) | type StyleKey = keyof SafeStyle;
constant BASE_INHERITABLE_PROPERTIES (line 9) | const BASE_INHERITABLE_PROPERTIES = [
constant TEXT_INHERITABLE_PROPERTIES (line 25) | const TEXT_INHERITABLE_PROPERTIES = [
FILE: packages/layout/src/steps/resolvePagination.ts
constant SAFETY_THRESHOLD (line 31) | const SAFETY_THRESHOLD = 0.001;
FILE: packages/layout/src/steps/resolveStyles.ts
constant DEFAULT_LINK_STYLES (line 14) | const DEFAULT_LINK_STYLES: Style = {
FILE: packages/layout/src/steps/resolveSvg.ts
type Container (line 27) | type Container = { width: number; height: number };
constant STYLE_PROPS (line 29) | const STYLE_PROPS = [
constant VERTICAL_PROPS (line 50) | const VERTICAL_PROPS = ['y', 'y1', 'y2', 'height', 'cy', 'ry'];
constant HORIZONTAL_PROPS (line 51) | const HORIZONTAL_PROPS = ['x', 'x1', 'x2', 'width', 'cx', 'rx'];
FILE: packages/layout/src/svg/inheritProps.ts
constant BASE_SVG_INHERITED_PROPS (line 5) | const BASE_SVG_INHERITED_PROPS = [
constant TEXT_SVG_INHERITED_PROPS (line 36) | const TEXT_SVG_INHERITED_PROPS = without(['x'], BASE_SVG_INHERITED_PROPS);
constant SVG_INHERITED_PROPS (line 38) | const SVG_INHERITED_PROPS = {
FILE: packages/layout/src/svg/replaceDefs.ts
constant URL_REGEX (line 16) | const URL_REGEX = /url\(['"]?#([^'"]+)['"]?\)/;
FILE: packages/layout/src/text/getAttributedString.ts
constant PREPROCESSORS (line 16) | const PREPROCESSORS = [ignoreChars, embedEmojis];
FILE: packages/layout/src/text/ignoreChars.ts
constant IGNORABLE_CODEPOINTS (line 3) | const IGNORABLE_CODEPOINTS = [
FILE: packages/layout/src/text/measureText.ts
constant ALIGNMENT_FACTORS (line 9) | const ALIGNMENT_FACTORS = { center: 0.5, right: 1 };
FILE: packages/layout/src/types/base.ts
type YogaInstance (line 8) | type YogaInstance = {
type Box (line 12) | type Box = {
type Origin (line 36) | type Origin = {
type Bookmark (line 41) | interface Bookmark {
type DynamicPageProps (line 52) | type DynamicPageProps = {
type RenderProp (line 59) | type RenderProp = (
type NodeProps (line 63) | type NodeProps = {
type FillRule (line 89) | type FillRule = 'nonzero' | 'evenodd';
type TextAnchor (line 91) | type TextAnchor = 'start' | 'middle' | 'end';
type StrokeLinecap (line 93) | type StrokeLinecap = 'butt' | 'round' | 'square';
type StrokeLinejoin (line 95) | type StrokeLinejoin = 'butt' | 'round' | 'square' | 'miter' | 'bevel';
type Visibility (line 97) | type Visibility = 'visible' | 'hidden' | 'collapse';
type DominantBaseline (line 99) | type DominantBaseline =
type SVGPresentationAttributes (line 108) | type SVGPresentationAttributes = {
type SafeSVGPresentationAttributes (line 127) | type SafeSVGPresentationAttributes = {
type FormCommonProps (line 146) | interface FormCommonProps extends NodeProps {
FILE: packages/layout/src/types/canvas.ts
type CanvasProps (line 7) | interface CanvasProps extends NodeProps {
type CanvasNode (line 15) | type CanvasNode = {
type SafeCanvasNode (line 25) | type SafeCanvasNode = Omit<CanvasNode, 'style'> & {
FILE: packages/layout/src/types/checkbox.ts
type CheckboxProps (line 7) | interface CheckboxProps extends FormCommonProps {
type CheckboxNode (line 16) | type CheckboxNode = {
type SafeCheckboxNode (line 26) | type SafeCheckboxNode = Omit<CheckboxNode, 'style'> & {
FILE: packages/layout/src/types/circle.ts
type CircleProps (line 10) | interface CircleProps extends SVGPresentationAttributes {
type SafeCircleProps (line 17) | interface SafeCircleProps extends SafeSVGPresentationAttributes {
type CircleNode (line 24) | type CircleNode = {
type SafeCircleNode (line 34) | type SafeCircleNode = Omit<CircleNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/clip-path.ts
type ClipPathProps (line 11) | interface ClipPathProps {
type ClipPathNode (line 15) | type ClipPathNode = {
type SafeClipPathNode (line 33) | type SafeClipPathNode = Omit<ClipPathNode, 'children'> & {
FILE: packages/layout/src/types/defs.ts
type DefsNode (line 6) | type DefsNode = {
type Defs (line 16) | type Defs = Record<string, DefsNode['children'][number]>;
type SafeDefsNode (line 18) | type SafeDefsNode = Omit<DefsNode, 'children'> & {
type SafeDefs (line 26) | type SafeDefs = Record<string, SafeDefsNode['children'][number]>;
FILE: packages/layout/src/types/document.ts
type PDFVersion (line 7) | type PDFVersion = '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.7ext3';
type PageLayout (line 9) | type PageLayout =
type PageMode (line 17) | type PageMode =
type OnRenderProps (line 25) | interface OnRenderProps {
type DocumentProps (line 29) | type DocumentProps = {
type DocumentNode (line 46) | type DocumentNode = {
type SafeDocumentNode (line 57) | type SafeDocumentNode = Omit<DocumentNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/ellipse.ts
type EllipseProps (line 9) | interface EllipseProps extends SVGPresentationAttributes {
type SafeEllipseProps (line 17) | interface SafeEllipseProps extends SafeSVGPresentationAttributes {
type EllipseNode (line 25) | type EllipseNode = {
type SafeEllipseNode (line 35) | type SafeEllipseNode = Omit<EllipseNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/field-set.ts
type FieldSetProps (line 10) | interface FieldSetProps extends NodeProps {
type FieldSetNode (line 14) | type FieldSetNode = {
type SafeFieldSetNode (line 24) | type SafeFieldSetNode = Omit<FieldSetNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/g.ts
type GProps (line 19) | interface GProps extends SVGPresentationAttributes {
type SafeGProps (line 23) | interface SafeGProps extends SafeSVGPresentationAttributes {
type GNode (line 27) | type GNode = {
type SafeGNode (line 49) | type SafeGNode = Omit<GNode, 'style' | 'props' | 'children'> & {
FILE: packages/layout/src/types/image.ts
type HTTPMethod (line 8) | type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
type SourceURL (line 10) | type SourceURL = string;
type SourceBuffer (line 12) | type SourceBuffer = Buffer;
type SourceBlob (line 14) | type SourceBlob = Blob;
type SourceDataBuffer (line 16) | type SourceDataBuffer = { data: Buffer; format: 'png' | 'jpg' };
type SourceURLObject (line 18) | type SourceURLObject = {
type Source (line 26) | type Source =
type SourceFactory (line 34) | type SourceFactory = () => Source;
type SourceAsync (line 36) | type SourceAsync = Promise<Source>;
type SourceAsyncFactory (line 38) | type SourceAsyncFactory = () => Promise<Source>;
type SourceObject (line 40) | type SourceObject =
type BaseImageProps (line 46) | interface BaseImageProps extends NodeProps {
type ImageWithSrcProp (line 52) | interface ImageWithSrcProp extends BaseImageProps {
type ImageWithSourceProp (line 57) | interface ImageWithSourceProp extends BaseImageProps {
type ImageProps (line 62) | type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
type ImageNode (line 64) | type ImageNode = {
type SafeImageNode (line 75) | type SafeImageNode = Omit<ImageNode, 'style'> & {
FILE: packages/layout/src/types/line.ts
type LineProps (line 9) | interface LineProps extends SVGPresentationAttributes {
type SafeLineProps (line 17) | interface SafeLineProps extends SafeSVGPresentationAttributes {
type LineNode (line 25) | type LineNode = {
type SafeLineNode (line 35) | type SafeLineNode = Omit<LineNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/linear-gradient.ts
type LinearGradientProps (line 5) | interface LinearGradientProps {
type SafeLinearGradientProps (line 16) | interface SafeLinearGradientProps {
type LinearGradientNode (line 27) | type LinearGradientNode = {
type SafeLinearGradientNode (line 37) | type SafeLinearGradientNode = Omit<
FILE: packages/layout/src/types/link.ts
type LinkProps (line 11) | interface LinkProps extends NodeProps {
type LinkNode (line 22) | type LinkNode = {
type SafeLinkNode (line 32) | type SafeLinkNode = Omit<LinkNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/node.ts
type Node (line 30) | type Node =
type SafeNode (line 61) | type SafeNode =
FILE: packages/layout/src/types/note.ts
type NoteNode (line 7) | type NoteNode = {
type SafeNoteNode (line 17) | type SafeNoteNode = Omit<NoteNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/page.ts
type Orientation (line 17) | type Orientation = 'portrait' | 'landscape';
type StandardPageSize (line 19) | type StandardPageSize =
type StaticSize (line 72) | type StaticSize = number | string;
type PageSize (line 74) | type PageSize =
type PageProps (line 81) | interface PageProps extends NodeProps {
type PageNode (line 92) | type PageNode = {
type SafePageNode (line 114) | type SafePageNode = Omit<PageNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/path.ts
type PathProps (line 9) | interface PathProps extends SVGPresentationAttributes {
type SafePathProps (line 14) | interface SafePathProps extends SafeSVGPresentationAttributes {
type PathNode (line 19) | type PathNode = {
type SafePathNode (line 29) | type SafePathNode = Omit<PathNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/polygon.ts
type PolygonProps (line 9) | interface PolygonProps extends SVGPresentationAttributes {
type SafePolygonProps (line 14) | interface SafePolygonProps extends SafeSVGPresentationAttributes {
type PolygonNode (line 19) | type PolygonNode = {
type SafePolygonNode (line 29) | type SafePolygonNode = Omit<PolygonNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/polyline.ts
type PolylineProps (line 9) | interface PolylineProps extends SVGPresentationAttributes {
type SafePolylineProps (line 14) | interface SafePolylineProps extends SafeSVGPresentationAttributes {
type PolylineNode (line 19) | type PolylineNode = {
type SafePolylineNode (line 29) | type SafePolylineNode = Omit<PolylineNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/radial-gradient.ts
type RadialGradientProps (line 6) | interface RadialGradientProps {
type SafeRadialGradientProps (line 19) | interface SafeRadialGradientProps {
type RadialGradientNode (line 32) | type RadialGradientNode = {
type SafeRadialGradientNode (line 42) | type SafeRadialGradientNode = Omit<
FILE: packages/layout/src/types/rect.ts
type RectProps (line 9) | interface RectProps extends SVGPresentationAttributes {
type SafeRectProps (line 19) | interface SafeRectProps extends SafeSVGPresentationAttributes {
type RectNode (line 29) | type RectNode = {
type SafeRectNode (line 39) | type SafeRectNode = Omit<RectNode, 'style' | 'props'> & {
FILE: packages/layout/src/types/select.ts
type SelectAndListProps (line 7) | interface SelectAndListProps extends FormCommonProps {
type SelectNode (line 15) | type SelectNode = {
type SafeSelectNode (line 25) | type SafeSelectNode = Omit<SelectNode, 'style'> & {
type ListNode (line 29) | type ListNode = {
type SafeListNode (line 39) | type SafeListNode = Omit<ListNode, 'style'> & {
FILE: packages/layout/src/types/stop.ts
type StopProps (line 3) | interface StopProps {
type StopSafeProps (line 9) | interface StopSafeProps {
type StopNode (line 15) | type StopNode = {
type SafeStopNode (line 25) | type SafeStopNode = Omit<StopNode, 'props'> & {
FILE: packages/layout/src/types/svg.ts
type Viewbox (line 25) | type Viewbox = {
type PreserveAspectRatio (line 32) | type PreserveAspectRatio = {
type SvgProps (line 47) | interface SvgProps extends NodeProps, SVGPresentationAttributes {
type SvgSafeProps (line 54) | interface SvgSafeProps extends NodeProps, SafeSVGPresentationAttributes {
type SvgNode (line 61) | type SvgNode = {
type SafeSvgNode (line 84) | type SafeSvgNode = Omit<SvgNode, 'style' | 'props' | 'children'> & {
FILE: packages/layout/src/types/text-input.ts
type TextInputFormatting (line 8) | interface TextInputFormatting {
type TextInputProps (line 27) | interface TextInputProps extends FormCommonProps {
type TextInputNode (line 49) | type TextInputNode = {
type SafeTextInputNode (line 59) | type SafeTextInputNode = Omit<TextInputNode, 'style'> & {
FILE: packages/layout/src/types/text-instance.ts
type TextInstanceNode (line 3) | type TextInstanceNode = {
type SafeTextInstanceNode (line 14) | type SafeTextInstanceNode = TextInstanceNode;
FILE: packages/layout/src/types/text.ts
type TextProps (line 12) | interface TextProps extends NodeProps {
type TextNode (line 39) | type TextNode = {
type SafeTextNode (line 51) | type SafeTextNode = Omit<TextNode, 'style' | 'children'> & {
FILE: packages/layout/src/types/tspan.ts
type TspanProps (line 11) | interface TspanProps extends SVGPresentationAttributes {
type SafeTspanProps (line 16) | interface SafeTspanProps extends SafeSVGPresentationAttributes {
type TspanNode (line 21) | type TspanNode = {
type SafeTspanNode (line 32) | type SafeTspanNode = Omit<TspanNode, 'style' | 'props' | 'children'> & {
FILE: packages/layout/src/types/view.ts
type ViewProps (line 16) | interface ViewProps extends NodeProps {
type ViewNode (line 26) | type ViewNode = {
type SafeViewNode (line 48) | type SafeViewNode = Omit<ViewNode, 'style' | 'children'> & {
FILE: packages/layout/tests/image/getSource.test.ts
constant VALUE (line 5) | const VALUE = 'gotcha';
FILE: packages/layout/tests/image/resolveSource.test.ts
constant SOURCE_URL (line 5) | const SOURCE_URL = 'gotcha';
constant SOURCE_URL_OBJECT (line 6) | const SOURCE_URL_OBJECT = { uri: 'gotcha', method: 'GET' };
constant SOURCE_BUFFER (line 7) | const SOURCE_BUFFER = Buffer.from('gotcha');
constant SOURCE_DATA_BUFFER (line 8) | const SOURCE_DATA_BUFFER = { data: Buffer.from('gotcha'), format: 'png' };
constant SOURCE_BLOB (line 9) | const SOURCE_BLOB = new Blob([SOURCE_BUFFER], { type: 'image/png' });
FILE: packages/layout/tests/text/heightAtLineIndex.test.ts
constant TEST_LINE (line 6) | const TEST_LINE = { box: { height: 25 } };
constant TEST_LINES (line 7) | const TEST_LINES = Array(10).fill(TEST_LINE);
FILE: packages/layout/tests/text/layoutText.test.ts
constant TEXT (line 9) | const TEXT =
FILE: packages/layout/tests/text/lineIndexAtHeight.test.ts
constant TEST_LINE (line 6) | const TEST_LINE = { box: { height: 25 } };
constant TEST_LINES (line 7) | const TEST_LINES = Array(10).fill(TEST_LINE);
FILE: packages/layout/tests/text/measureText.test.ts
constant TEXT (line 8) | const TEXT =
FILE: packages/pdfkit/src/abstract_reference.js
class PDFAbstractReference (line 5) | class PDFAbstractReference {
method toString (line 6) | toString() {
FILE: packages/pdfkit/src/data.js
class Data (line 1) | class Data {
method constructor (line 2) | constructor(data = []) {
method readByte (line 8) | readByte() {
method writeByte (line 12) | writeByte(byte) {
method byteAt (line 16) | byteAt(index) {
method readBool (line 20) | readBool() {
method writeBool (line 24) | writeBool(val) {
method readUInt32 (line 28) | readUInt32() {
method writeUInt32 (line 36) | writeUInt32(val) {
method readInt32 (line 43) | readInt32() {
method writeInt32 (line 52) | writeInt32(val) {
method readUInt16 (line 59) | readUInt16() {
method writeUInt16 (line 65) | writeUInt16(val) {
method readInt16 (line 70) | readInt16() {
method writeInt16 (line 79) | writeInt16(val) {
method readString (line 86) | readString(length) {
method writeString (line 95) | writeString(val) {
method stringAt (line 104) | stringAt(pos, length) {
method readShort (line 109) | readShort() {
method writeShort (line 113) | writeShort(val) {
method readLongLong (line 117) | readLongLong() {
method writeLongLong (line 155) | writeLongLong(val) {
method readInt (line 168) | readInt() {
method writeInt (line 172) | writeInt(val) {
method slice (line 176) | slice(start, end) {
method read (line 180) | read(bytes) {
method write (line 189) | write(bytes) {
FILE: packages/pdfkit/src/document.js
class PDFDocument (line 26) | class PDFDocument extends stream.Readable {
method constructor (line 27) | constructor(options = {}) {
method addPage (line 136) | addPage(options) {
method continueOnNewPage (line 169) | continueOnNewPage(options) {
method bufferedPageRange (line 179) | bufferedPageRange() {
method switchToPage (line 183) | switchToPage(n) {
method flushPages (line 196) | flushPages() {
method addNamedDestination (line 208) | addNamedDestination(name, ...args) {
method addNamedEmbeddedFile (line 219) | addNamedEmbeddedFile(name, ref) {
method addNamedJavaScript (line 231) | addNamedJavaScript(name, js) {
method ref (line 242) | ref(data) {
method _read (line 249) | _read() {}
method _write (line 252) | _write(data) {
method addContent (line 261) | addContent(data) {
method _refEnd (line 266) | _refEnd(ref) {
method end (line 274) | end() {
method _finalize (line 326) | _finalize() {
method toString (line 360) | toString() {
FILE: packages/pdfkit/src/font.js
class PDFFont (line 5) | class PDFFont {
method open (line 6) | static open(document, src, family, id) {
method encode (line 34) | encode() {
method widthOfString (line 38) | widthOfString() {
method ref (line 42) | ref() {
method finalize (line 48) | finalize() {
method embed (line 57) | embed() {
method lineHeight (line 61) | lineHeight(size, includeGap) {
FILE: packages/pdfkit/src/font/afm.js
constant WIN_ANSI_MAP (line 4) | const WIN_ANSI_MAP = {
function parse (line 108) | function parse(contents) {
class AFMFont (line 163) | class AFMFont {
method open (line 164) | static open(filename) {
method fromJson (line 171) | static fromJson(json) {
method constructor (line 175) | constructor(contents) {
method parse (line 199) | parse() {
method encodeText (line 207) | encodeText(text) {
method glyphsForString (line 222) | glyphsForString(string) {
method characterToGlyph (line 237) | characterToGlyph(character) {
method widthOfGlyph (line 241) | widthOfGlyph(glyph) {
method getKernPair (line 245) | getKernPair(left, right) {
method advancesForGlyphs (line 249) | advancesForGlyphs(glyphs) {
FILE: packages/pdfkit/src/font/data/compressData.js
constant COMPRESS_ORDER (line 25) | const COMPRESS_ORDER = ['Helvetica', 'Times', 'Courier'];
FILE: packages/pdfkit/src/font/embedded.js
method constructor (line 11) | constructor(document, font, id) {
method layoutRun (line 33) | layoutRun(text, features) {
method layoutCached (line 50) | layoutCached(text) {
method layout (line 61) | layout(text, features, onlyWidth) {
method encode (line 100) | encode(text, features) {
method encodeGlyphs (line 120) | encodeGlyphs(glyphs) {
method widthOfString (line 138) | widthOfString(string, size, features) {
method embed (line 144) | embed() {
method toUnicodeCmap (line 243) | toUnicodeCmap() {
FILE: packages/pdfkit/src/font/standard.js
constant STANDARD_FONTS (line 5) | const STANDARD_FONTS = expandData(data);
method constructor (line 9) | constructor(document, name, id) {
method embed (line 22) | embed() {
method encode (line 33) | encode(text) {
method encodeGlyphs (line 53) | encodeGlyphs(glyphs) {
method widthOfString (line 63) | widthOfString(string, size) {
method isStandardFont (line 76) | static isStandardFont(name) {
FILE: packages/pdfkit/src/font_factory.js
class PDFFontFactory (line 6) | class PDFFontFactory {
method open (line 7) | static open(document, src, family, id) {
FILE: packages/pdfkit/src/gradient.js
class PDFGradient (line 5) | class PDFGradient {
method constructor (line 6) | constructor(doc) {
method stop (line 13) | stop(pos, color, opacity) {
method setTransform (line 42) | setTransform(m11, m12, m21, m22, dx, dy) {
method embed (line 47) | embed(m) {
method apply (line 187) | apply(stroke) {
class PDFLinearGradient (line 209) | class PDFLinearGradient extends PDFGradient {
method constructor (line 210) | constructor(doc, x1, y1, x2, y2) {
method shader (line 218) | shader(fn) {
method opacityGradient (line 228) | opacityGradient() {
class PDFRadialGradient (line 233) | class PDFRadialGradient extends PDFGradient {
method constructor (line 234) | constructor(doc, x1, y1, r1, x2, y2, r2) {
method shader (line 245) | shader(fn) {
method opacityGradient (line 255) | opacityGradient() {
FILE: packages/pdfkit/src/image.js
class PDFImage (line 10) | class PDFImage {
method open (line 11) | static open(src, label) {
FILE: packages/pdfkit/src/image/jpeg.js
constant COLOR_SPACE_MAP (line 3) | const COLOR_SPACE_MAP = {
class JPEG (line 9) | class JPEG {
method constructor (line 10) | constructor(data, label) {
method embed (line 39) | embed(document) {
FILE: packages/pdfkit/src/image/png.js
class PNGImage (line 4) | class PNGImage {
method constructor (line 5) | constructor(data, label) {
method embed (line 14) | embed(document) {
method finalize (line 99) | finalize() {
method splitAlphaChannel (line 124) | splitAlphaChannel() {
method loadIndexedAlphaChannel (line 152) | loadIndexedAlphaChannel() {
method decodeData (line 167) | decodeData() {
FILE: packages/pdfkit/src/line_wrapper.js
constant SOFT_HYPHEN (line 5) | const SOFT_HYPHEN = '\u00AD';
constant HYPHEN (line 6) | const HYPHEN = '-';
class LineWrapper (line 8) | class LineWrapper extends EventEmitter {
method constructor (line 9) | constructor(document, options) {
method wordWidth (line 87) | wordWidth(word) {
method canFit (line 95) | canFit(word, w) {
method eachWord (line 102) | eachWord(text, fn) {
method wrap (line 182) | wrap(text, options) {
method nextSection (line 337) | nextSection(options) {
FILE: packages/pdfkit/src/metadata.js
class PDFMetadata (line 1) | class PDFMetadata {
method constructor (line 2) | constructor() {
method _closeTags (line 10) | _closeTags() {
method append (line 18) | append(xml, newline = true) {
method getXML (line 23) | getXML() {
method getLength (line 27) | getLength() {
method end (line 31) | end() {
FILE: packages/pdfkit/src/mixins/acroform.js
constant FIELD_FLAGS (line 1) | const FIELD_FLAGS = {
constant FIELD_JUSTIFY (line 16) | const FIELD_JUSTIFY = {
constant VALUE_MAP (line 21) | const VALUE_MAP = { value: 'V', defaultValue: 'DV' };
constant FORMAT_SPECIAL (line 22) | const FORMAT_SPECIAL = {
constant FORMAT_DEFAULT (line 29) | const FORMAT_DEFAULT = {
method initForm (line 48) | initForm() {
method endAcroForm (line 75) | endAcroForm() {
method _endChild (line 95) | _endChild(ref) {
method formField (line 112) | formField(name, options = {}) {
method formAnnotation (line 130) | formAnnotation(name, type, x, y, w, h, options = {}) {
method formText (line 144) | formText(name, x, y, w, h, options = {}) {
method formPushButton (line 148) | formPushButton(name, x, y, w, h, options = {}) {
method formCombo (line 152) | formCombo(name, x, y, w, h, options = {}) {
method formList (line 156) | formList(name, x, y, w, h, options = {}) {
method formRadioButton (line 160) | formRadioButton(name, x, y, w, h, options = {}) {
method formCheckbox (line 164) | formCheckbox(name, x, y, w, h, options = {}) {
method _addToParent (line 168) | _addToParent(fieldRef) {
method _fieldDict (line 181) | _fieldDict(name, type, options = {}) {
method _resolveType (line 205) | _resolveType(type, opts) {
method _resolveFormat (line 227) | _resolveFormat(opts) {
method _resolveColors (line 278) | _resolveColors(opts) {
method _resolveFlags (line 298) | _resolveFlags(options) {
method _resolveJustify (line 315) | _resolveJustify(options) {
method _resolveFont (line 329) | _resolveFont(options) {
method _resolveStrings (line 348) | _resolveStrings(options) {
FILE: packages/pdfkit/src/mixins/annotations.js
method annotate (line 2) | annotate(x, y, w, h, options) {
method note (line 34) | note(x, y, w, h, contents, options = {}) {
method goTo (line 46) | goTo(x, y, w, h, name, options = {}) {
method link (line 56) | link(x, y, w, h, url, options = {}) {
method _markup (line 83) | _markup(x, y, w, h, options = {}) {
method highlight (line 90) | highlight(x, y, w, h, options = {}) {
method underline (line 98) | underline(x, y, w, h, options = {}) {
method strike (line 103) | strike(x, y, w, h, options = {}) {
method lineAnnotation (line 108) | lineAnnotation(x1, y1, x2, y2, options = {}) {
method rectAnnotation (line 115) | rectAnnotation(x, y, w, h, options = {}) {
method ellipseAnnotation (line 121) | ellipseAnnotation(x, y, w, h, options = {}) {
method textAnnotation (line 127) | textAnnotation(x, y, w, h, text, options = {}) {
method fileAnnotation (line 134) | fileAnnotation(x, y, w, h, file = {}, options = {}) {
method _convertRect (line 151) | _convertRect(x1, y1, w, h) {
FILE: packages/pdfkit/src/mixins/attachments.js
method file (line 18) | file(src, options = {}) {
function isEqual (line 117) | function isEqual(a, b) {
FILE: packages/pdfkit/src/mixins/color.js
method initColor (line 9) | initColor() {
method _normalizeColor (line 18) | _normalizeColor(color) {
method _setColor (line 50) | _setColor(color, stroke) {
method _setColorCore (line 63) | _setColorCore(color, stroke) {
method _setColorSpace (line 83) | _setColorSpace(space, stroke) {
method _getColorSpace (line 88) | _getColorSpace(color) {
method fillColor (line 96) | fillColor(color, opacity) {
method strokeColor (line 108) | strokeColor(color, opacity) {
method opacity (line 116) | opacity(opacity) {
method fillOpacity (line 121) | fillOpacity(opacity) {
method strokeOpacity (line 126) | strokeOpacity(opacity) {
method _doOpacity (line 131) | _doOpacity(fillOpacity, strokeOpacity) {
method linearGradient (line 168) | linearGradient(x1, y1, x2, y2) {
method radialGradient (line 172) | radialGradient(x1, y1, r1, x2, y2, r2) {
method pattern (line 176) | pattern(bbox, xStep, yStep, stream) {
method addSpotColor (line 180) | addSpotColor(name, C, M, Y, K) {
FILE: packages/pdfkit/src/mixins/fonts.js
method initFonts (line 4) | initFonts() {
method font (line 19) | font(src, family, size) {
method fontSize (line 71) | fontSize(_fontSize) {
method currentLineHeight (line 76) | currentLineHeight(includeGap) {
method registerFont (line 83) | registerFont(name, src, family) {
FILE: packages/pdfkit/src/mixins/images.js
method initImages (line 4) | initImages() {
method image (line 9) | image(src, x, y, options = {}) {
method openImage (line 219) | openImage(src) {
FILE: packages/pdfkit/src/mixins/markings.js
method initMarkings (line 12) | initMarkings(options) {
method markContent (line 21) | markContent(tag, options = null) {
method markStructureContent (line 85) | markStructureContent(tag, options = {}) {
method endMarkedContent (line 99) | endMarkedContent() {
method struct (line 105) | struct(type, options = {}, children = null) {
method addStructure (line 109) | addStructure(structElem) {
method initPageMarkings (line 121) | initPageMarkings(pageMarkings) {
method endPageMarkings (line 137) | endPageMarkings(page) {
method getMarkInfoDictionary (line 144) | getMarkInfoDictionary() {
method hasMarkInfoDictionary (line 151) | hasMarkInfoDictionary() {
method getStructTreeRoot (line 155) | getStructTreeRoot() {
method getStructParentTree (line 166) | getStructParentTree() {
method createStructParentTreeNextKey (line 170) | createStructParentTreeNextKey() {
method endMarkings (line 180) | endMarkings() {
FILE: packages/pdfkit/src/mixins/metadata.js
method initMetadata (line 4) | initMetadata() {
method appendXML (line 8) | appendXML(xml, newline = true) {
method _addInfo (line 12) | _addInfo() {
method endMetadata (line 80) | endMetadata() {
FILE: packages/pdfkit/src/mixins/outline.js
method initOutline (line 4) | initOutline() {
method endOutline (line 8) | endOutline() {
FILE: packages/pdfkit/src/mixins/pdfa.js
method initPDFA (line 4) | initPDFA(pSubset) {
method endSubset (line 17) | endSubset() {
method _addColorOutputIntent (line 22) | _addColorOutputIntent() {
method _getPdfaid (line 46) | _getPdfaid() {
method _addPdfaMetadata (line 55) | _addPdfaMetadata() {
FILE: packages/pdfkit/src/mixins/pdfua.js
method initPDFUA (line 2) | initPDFUA() {
method endSubset (line 6) | endSubset() {
method _addPdfuaMetadata (line 10) | _addPdfuaMetadata() {
method _getPdfuaid (line 14) | _getPdfuaid() {
FILE: packages/pdfkit/src/mixins/subsets.js
method _importSubset (line 5) | _importSubset(subset) {
method initSubset (line 9) | initSubset(options) {
FILE: packages/pdfkit/src/mixins/text.js
method initText (line 8) | initText() {
method lineGap (line 17) | lineGap(_lineGap) {
method moveDown (line 22) | moveDown(lines) {
method moveUp (line 30) | moveUp(lines) {
method _text (line 38) | _text(text, x, y, options, lineCallback) {
method text (line 92) | text(text, x, y, options) {
method widthOfString (line 96) | widthOfString(string, options = {}) {
method boundsOfString (line 116) | boundsOfString(string, x, y, options) {}
method heightOfString (line 118) | heightOfString(text, options) {
method list (line 136) | list(list, x, y, options, wrapper) {
method _initOptions (line 266) | _initOptions(x = {}, y, options = {}) {
method _line (line 317) | _line(text, options = {}, wrapper) {
method _fragment (line 328) | _fragment(text, x, y, options) {
FILE: packages/pdfkit/src/mixins/vector.js
constant KAPPA (line 8) | const KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
method initVector (line 10) | initVector() {
method save (line 15) | save() {
method restore (line 21) | restore() {
method closePath (line 26) | closePath() {
method lineWidth (line 30) | lineWidth(w) {
method lineCap (line 40) | lineCap(c) {
method lineJoin (line 53) | lineJoin(j) {
method miterLimit (line 60) | miterLimit(m) {
method dash (line 64) | dash(length, options = {}) {
method undash (line 83) | undash() {
method moveTo (line 87) | moveTo(x, y) {
method lineTo (line 91) | lineTo(x, y) {
method bezierCurveTo (line 95) | bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
method quadraticCurveTo (line 103) | quadraticCurveTo(cpx, cpy, x, y) {
method rect (line 109) | rect(x, y, w, h) {
method roundedRect (line 115) | roundedRect(x, y, w, h, r) {
method ellipse (line 136) | ellipse(x, y, r1, r2) {
method circle (line 158) | circle(x, y, radius) {
method arc (line 162) | arc(x, y, radius, startAngle, endAngle, anticlockwise) {
method polygon (line 223) | polygon(...points) {
method path (line 231) | path(path) {
method _windingRule (line 236) | _windingRule(rule) {
method fill (line 244) | fill(color, rule) {
method stroke (line 256) | stroke(color) {
method fillAndStroke (line 263) | fillAndStroke(fillColor, strokeColor, rule) {
method clip (line 286) | clip(rule) {
method transform (line 290) | transform(m11, m12, m21, m22, dx, dy) {
method translate (line 316) | translate(x, y) {
method rotate (line 320) | rotate(angle, options = {}) {
method scale (line 338) | scale(xFactor, yFactor, options = {}) {
FILE: packages/pdfkit/src/name_tree.js
class PDFNameTree (line 7) | class PDFNameTree extends PDFTree {
method _compareKeys (line 8) | _compareKeys(a, b) {
method _keysName (line 12) | _keysName() {
method _dataForKey (line 16) | _dataForKey(k) {
FILE: packages/pdfkit/src/number_tree.js
class PDFNumberTree (line 7) | class PDFNumberTree extends PDFTree {
method _compareKeys (line 8) | _compareKeys(a, b) {
method _keysName (line 12) | _keysName() {
method _dataForKey (line 16) | _dataForKey(k) {
FILE: packages/pdfkit/src/object.js
class PDFObject (line 39) | class PDFObject {
method convert (line 40) | static convert(object) {
method number (line 118) | static number(n) {
FILE: packages/pdfkit/src/outline.js
constant DEFAULT_OPTIONS (line 2) | const DEFAULT_OPTIONS = {
class PDFOutline (line 12) | class PDFOutline {
method constructor (line 13) | constructor(document, parent, title, dest, options = DEFAULT_OPTIONS) {
method addItem (line 44) | addItem(title, options = DEFAULT_OPTIONS) {
method endOutline (line 66) | endOutline() {
FILE: packages/pdfkit/src/page.js
constant DEFAULT_MARGINS (line 9) | const DEFAULT_MARGINS = {
constant SIZES (line 16) | const SIZES = {
class PDFPage (line 69) | class PDFPage {
method constructor (line 70) | constructor(document, options = {}) {
method fonts (line 122) | get fonts() {
method xobjects (line 127) | get xobjects() {
method ext_gstates (line 132) | get ext_gstates() {
method patterns (line 137) | get patterns() {
method colorSpaces (line 142) | get colorSpaces() {
method annotations (line 147) | get annotations() {
method structParentTreeKey (line 152) | get structParentTreeKey() {
method maxY (line 159) | maxY() {
method write (line 163) | write(chunk) {
method _setTabOrder (line 168) | _setTabOrder() {
method end (line 174) | end() {
FILE: packages/pdfkit/src/path.js
method M (line 268) | M(doc, a) {
method m (line 277) | m(doc, a) {
method C (line 286) | C(doc, a) {
method c (line 294) | c(doc, a) {
method S (line 309) | S(doc, a) {
method s (line 322) | s(doc, a) {
method Q (line 342) | Q(doc, a) {
method q (line 350) | q(doc, a) {
method T (line 358) | T(doc, a) {
method t (line 374) | t(doc, a) {
method A (line 388) | A(doc, a) {
method a (line 394) | a(doc, a) {
method L (line 402) | L(doc, a) {
method l (line 409) | l(doc, a) {
method H (line 416) | H(doc, a) {
method h (line 422) | h(doc, a) {
method V (line 428) | V(doc, a) {
method v (line 434) | v(doc, a) {
method Z (line 440) | Z(doc) {
method z (line 446) | z(doc) {
class SVGPath (line 550) | class SVGPath {
method apply (line 551) | static apply(doc, path) {
FILE: packages/pdfkit/src/pattern.js
class PDFTilingPattern (line 7) | class PDFTilingPattern {
method constructor (line 8) | constructor(doc, bBox, xStep, yStep, stream) {
method createPattern (line 16) | createPattern() {
method embedPatternColorSpaces (line 48) | embedPatternColorSpaces() {
method getPatternColorSpaceId (line 61) | getPatternColorSpaceId(underlyingColorspace) {
method embed (line 65) | embed() {
method apply (line 78) | apply(stroke, patternColor) {
FILE: packages/pdfkit/src/reference.js
class PDFReference (line 10) | class PDFReference extends stream.Writable {
method constructor (line 11) | constructor(document, id, data) {
method initDeflate (line 29) | initDeflate() {
method _write (line 41) | _write(chunk, encoding, callback) {
method end (line 64) | end() {
method finalize (line 74) | finalize() {
method toString (line 94) | toString() {
FILE: packages/pdfkit/src/security.js
class PDFSecurity (line 21) | class PDFSecurity {
method generateFileID (line 22) | static generateFileID(info = {}) {
FILE: packages/pdfkit/src/spotcolor.js
class SpotColor (line 1) | class SpotColor {
method constructor (line 2) | constructor(doc, name, C, M, Y, K) {
method toString (line 22) | toString() {
FILE: packages/pdfkit/src/structure_content.js
class PDFStructureContent (line 6) | class PDFStructureContent {
method constructor (line 7) | constructor(pageRef, mcid) {
method push (line 11) | push(structContent) {
FILE: packages/pdfkit/src/structure_element.js
class PDFStructureElement (line 8) | class PDFStructureElement {
method constructor (line 9) | constructor(document, type, options = {}, children = null) {
method add (line 54) | add(child) {
method _addContentToParentTree (line 84) | _addContentToParentTree(content) {
method setParent (line 93) | setParent(parentRef) {
method setAttached (line 103) | setAttached() {
method end (line 122) | end() {
method _isValidChild (line 136) | _isValidChild(child) {
method _contentForClosure (line 144) | _contentForClosure(closure) {
method _isFlushable (line 154) | _isFlushable() {
method _flush (line 170) | _flush() {
method _flushChild (line 190) | _flushChild(child) {
FILE: packages/pdfkit/src/tree.js
class PDFTree (line 7) | class PDFTree {
method constructor (line 8) | constructor(options = {}) {
method add (line 14) | add(key, val) {
method get (line 18) | get(key) {
method toString (line 22) | toString() {
method _compareKeys (line 49) | _compareKeys(/*a, b*/) {
method _keysName (line 53) | _keysName() {
method _dataForKey (line 57) | _dataForKey(/*k*/) {
FILE: packages/pdfkit/src/utils.js
function PDFNumber (line 1) | function PDFNumber(n) {
function normalizeSides (line 49) | function normalizeSides(
constant MM_TO_CM (line 94) | const MM_TO_CM = 1 / 10;
constant CM_TO_IN (line 95) | const CM_TO_IN = 1 / 2.54;
constant PX_TO_IN (line 96) | const PX_TO_IN = 1 / 96;
constant IN_TO_PT (line 97) | const IN_TO_PT = 72;
constant PC_TO_PT (line 98) | const PC_TO_PT = 12;
function cosine (line 107) | function cosine(a) {
function sine (line 122) | function sine(a) {
FILE: packages/pdfkit/src/virtual-fs.js
class VirtualFileSystem (line 1) | class VirtualFileSystem {
method constructor (line 2) | constructor() {
method readFileSync (line 6) | readFileSync(fileName, options = {}) {
method writeFileSync (line 25) | writeFileSync(fileName, content) {
method bindFileData (line 29) | bindFileData(data = {}, options = {}) {
function normalizeFilename (line 38) | function normalizeFilename(fileName) {
FILE: packages/png-js/src/index.js
class PNG (line 4) | class PNG {
method decode (line 5) | static decode(path, fn) {
method load (line 16) | static load(path) {
method constructor (line 25) | constructor(data) {
method read (line 147) | read(bytes) {
method readUInt32 (line 155) | readUInt32() {
method readUInt16 (line 163) | readUInt16() {
method decodePixels (line 169) | decodePixels(fn) {
method decodePalette (line 328) | decodePalette() {
method copyToImageData (line 347) | copyToImageData(imageData, pixels) {
method decode (line 388) | decode(fn) {
FILE: packages/reconciler/build/trim-reconciler.js
constant KEEP_OPTIONS (line 8) | const KEEP_OPTIONS = {
constant STATIC_OPTIONS (line 42) | const STATIC_OPTIONS = {
constant METHOD_KEYS (line 49) | const METHOD_KEYS = {
function clearReconcilerOptions (line 56) | function clearReconcilerOptions(path) {
function clearReconcilerMethods (line 78) | function clearReconcilerMethods(path) {
method transform (line 97) | transform(code) {
FILE: packages/reconciler/src/reconciler-23.ts
method prepareForCommit (line 37) | prepareForCommit() {}
method clearContainer (line 38) | clearContainer() {}
method resetTextContent (line 39) | resetTextContent() {}
FILE: packages/reconciler/src/reconciler-31.ts
method prepareForCommit (line 49) | prepareForCommit() {}
method clearContainer (line 50) | clearContainer() {}
method resetTextContent (line 51) | resetTextContent() {}
FILE: packages/reconciler/src/reconciler-33.ts
method prepareForCommit (line 49) | prepareForCommit() {}
method clearContainer (line 50) | clearContainer() {}
method resetTextContent (line 51) | resetTextContent() {}
FILE: packages/reconciler/src/types.ts
type Reconciler (line 1) | interface Reconciler<T> {
type ReconcilerFactory (line 11) | type ReconcilerFactory = <I, T>(config: {
FILE: packages/render/src/operations/addBookmarks.ts
type Registry (line 5) | type Registry = Record<number, any>;
FILE: packages/render/src/operations/clipNode.ts
constant KAPPA (line 7) | const KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
FILE: packages/render/src/primitives/renderBorders.ts
type SafeBorderStyle (line 6) | type SafeBorderStyle = {
constant KAPPA (line 26) | const KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
FILE: packages/render/src/primitives/renderDebug.ts
constant CONTENT_COLOR (line 4) | const CONTENT_COLOR = '#a1c6e7';
constant PADDING_COLOR (line 5) | const PADDING_COLOR = '#c4deb9';
constant MARGIN_COLOR (line 6) | const MARGIN_COLOR = '#f8cca1';
FILE: packages/render/src/primitives/renderEllipse.ts
constant KAPPA (line 4) | const KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
FILE: packages/render/src/primitives/renderNode.ts
type Primitives (line 24) | type Primitives = (typeof P)[keyof typeof P];
FILE: packages/render/src/primitives/renderRect.ts
constant KAPPA (line 4) | const KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
FILE: packages/render/src/primitives/renderSvg.ts
type Primitives (line 26) | type Primitives = (typeof P)[keyof typeof P];
function multiplyMatrices (line 110) | function multiplyMatrices(m1: number[], m2: number[]) {
FILE: packages/render/src/primitives/renderText.ts
constant DEST_REGEXP (line 16) | const DEST_REGEXP = /^#.+/;
FILE: packages/render/src/svg/getBoundingBox.ts
type Primitives (line 17) | type Primitives = (typeof P)[keyof typeof P];
FILE: packages/render/src/types.ts
type PDFFontSource (line 5) | type PDFFontSource = string | Buffer | Uint8Array | ArrayBuffer | Font;
type Context (line 7) | type Context = typeof PDFKitDocument & {
type RenderOptions (line 22) | interface RenderOptions {
FILE: packages/renderer/index.d.ts
class ReactPDF (line 18) | class ReactPDF {
type Styles (line 25) | interface Styles {
type OnRenderProps (line 28) | interface OnRenderProps {
type DocumentProps (line 32) | interface DocumentProps {
class Document (line 55) | class Document extends React.Component<
type NodeProps (line 59) | interface NodeProps {
type PageProps (line 80) | interface PageProps extends NodeProps {
class Page (line 103) | class Page extends React.Component<
type ViewProps (line 107) | interface ViewProps extends NodeProps {
class View (line 129) | class View extends React.Component<
type BaseImageProps (line 133) | interface BaseImageProps extends NodeProps {
type ImageWithSrcProp (line 142) | interface ImageWithSrcProp extends BaseImageProps {
type ImageWithSourceProp (line 146) | interface ImageWithSourceProp extends BaseImageProps {
type ImageProps (line 150) | type ImageProps = ImageWithSrcProp | ImageWithSourceProp;
class Image (line 156) | class Image extends React.Component<ImageProps> {}
type TextProps (line 158) | interface TextProps extends NodeProps {
type SVGTextProps (line 193) | interface SVGTextProps extends SVGPresentationAttributes {
class Text (line 208) | class Text extends React.Component<
type LinkProps (line 212) | interface LinkProps extends NodeProps {
class Link (line 231) | class Link extends React.Component<
type FormCommonProps (line 235) | interface FormCommonProps extends NodeProps {
type FieldSetProps (line 244) | interface FieldSetProps extends NodeProps {
class FieldSet (line 248) | class FieldSet extends React.Component<
type TextInputFormatting (line 253) | interface TextInputFormatting {
type TextInputProps (line 272) | interface TextInputProps extends FormCommonProps {
class TextInput (line 294) | class TextInput extends React.Component<TextInputProps> {}
type CheckboxProps (line 296) | interface CheckboxProps extends FormCommonProps {
class Checkbox (line 305) | class Checkbox extends React.Component<CheckboxProps> {}
type SelectAndListPropsBase (line 307) | interface SelectAndListPropsBase extends FormCommonProps {
type SelectAndListPropsWithEdit (line 315) | type SelectAndListPropsWithEdit = SelectAndListPropsBase & {
type SelectAndListPropsWithNoSpell (line 320) | type SelectAndListPropsWithNoSpell = SelectAndListPropsBase & {
type SelectAndListProps (line 325) | type SelectAndListProps =
class Select (line 329) | class Select extends React.Component<SelectAndListProps> {}
class List (line 331) | class List extends React.Component<SelectAndListProps> {}
type NoteProps (line 333) | interface NoteProps extends NodeProps {
class Note (line 337) | class Note extends React.Component<NoteProps> {}
type CanvasProps (line 339) | interface CanvasProps extends NodeProps {
class Canvas (line 352) | class Canvas extends React.Component<CanvasProps> {}
type SVGProps (line 354) | interface SVGProps extends NodeProps, SVGPresentationAttributes {
class Svg (line 369) | class Svg extends React.Component<React.PropsWithChildren<SVGProps>> {}
type LineProps (line 371) | interface LineProps extends SVGPresentationAttributes {
class Line (line 382) | class Line extends React.Component<
type PolylineProps (line 386) | interface PolylineProps extends SVGPresentationAttributes {
class Polyline (line 394) | class Polyline extends React.Component<
type PolygonProps (line 398) | interface PolygonProps extends SVGPresentationAttributes {
class Polygon (line 407) | class Polygon extends React.Component<
type PathProps (line 411) | interface PathProps extends SVGPresentationAttributes {
class Path (line 419) | class Path extends React.Component<
type RectProps (line 423) | interface RectProps extends SVGPresentationAttributes {
class Rect (line 436) | class Rect extends React.Component<
type CircleProps (line 440) | interface CircleProps extends SVGPresentationAttributes {
class Circle (line 450) | class Circle extends React.Component<
type EllipseProps (line 454) | interface EllipseProps extends SVGPresentationAttributes {
class Ellipse (line 466) | class Ellipse extends React.Component<
type TspanProps (line 470) | interface TspanProps extends SVGPresentationAttributes {
class Tspan (line 479) | class Tspan extends React.Component<
type GProps (line 483) | interface GProps extends SVGPresentationAttributes {
class G (line 491) | class G extends React.Component<React.PropsWithChildren<GProps>> {}
type StopProps (line 493) | interface StopProps {
class Stop (line 502) | class Stop extends React.Component<
type DefsProps (line 507) | interface DefsProps {}
class Defs (line 512) | class Defs extends React.Component<
type ClipPathProps (line 516) | interface ClipPathProps {
class ClipPath (line 524) | class ClipPath extends React.Component<
type LinearGradientProps (line 528) | interface LinearGradientProps {
class LinearGradient (line 542) | class LinearGradient extends React.Component<
type RadialGradientProps (line 546) | interface RadialGradientProps {
class RadialGradient (line 561) | class RadialGradient extends React.Component<
type BlobProviderParams (line 565) | interface BlobProviderParams {
type BlobProviderProps (line 571) | interface BlobProviderProps {
class BlobProvider (line 582) | class BlobProvider extends React.Component<BlobProviderProps> {}
type PDFViewerProps (line 584) | interface PDFViewerProps {
class PDFViewer (line 598) | class PDFViewer extends React.Component<PDFViewerProps> {}
type PDFDownloadLinkProps (line 600) | interface PDFDownloadLinkProps
class PDFDownloadLink (line 622) | class PDFDownloadLink extends React.Component<PDFDownloadLinkProps> {}
type UsePDFInstance (line 624) | interface UsePDFInstance {
FILE: packages/renderer/tests/environment/jsdom.js
function patchGlobals (line 3) | function patchGlobals() {
method setupVM (line 25) | async setupVM({ jsdom = {} }) {
method setup (line 34) | async setup(global, { jsdom = {} }) {
FILE: packages/renderer/tests/renderComponent.js
method create (line 11) | create(width, height) {
method reset (line 20) | reset(canvasAndContext, width, height) {
method destroy (line 25) | destroy(canvasAndContext) {
function getCanvas (line 33) | async function getCanvas(pagePromise) {
constant GAP (line 53) | const GAP = 10;
FILE: packages/stylesheet/src/flatten/index.ts
type StyleInput (line 4) | type StyleInput = Style | StyleInput[] | null | undefined;
FILE: packages/stylesheet/src/index.ts
type StyleParam (line 8) | type StyleParam = Style | null | undefined;
FILE: packages/stylesheet/src/resolve/borders.ts
constant BORDER_SHORTHAND_REGEX (line 12) | const BORDER_SHORTHAND_REGEX =
type BorderKey (line 18) | type BorderKey = keyof BorderStyle;
FILE: packages/stylesheet/src/resolve/boxModel.ts
constant BOX_MODEL_UNITS (line 7) | const BOX_MODEL_UNITS = new Set([
type ParseValue (line 20) | interface ParseValue {
FILE: packages/stylesheet/src/resolve/flex.ts
type FlexDefaults (line 12) | type FlexDefaults = (number | string)[];
FILE: packages/stylesheet/src/resolve/index.ts
type Handler (line 15) | type Handler = (
FILE: packages/stylesheet/src/resolve/text.ts
constant DEFAULT_FONT_SIZE (line 14) | const DEFAULT_FONT_SIZE = 18;
constant FONT_WEIGHTS (line 16) | const FONT_WEIGHTS: Record<string, number> = {
FILE: packages/stylesheet/src/resolve/transform.ts
type ParsedTransformOperation (line 40) | type ParsedTransformOperation = {
constant Y_AXIS_SHORTHANDS (line 122) | const Y_AXIS_SHORTHANDS: Record<string, boolean> = { top: true, bottom: ...
FILE: packages/stylesheet/src/types.ts
type Container (line 1) | type Container = {
type Percentage (line 9) | type Percentage = `${string}%`;
type BorderStyleValue (line 13) | type BorderStyleValue = 'dashed' | 'dotted' | 'solid';
type BorderShorthandStyle (line 15) | type BorderShorthandStyle = {
type BorderExpandedStyle (line 27) | type BorderExpandedStyle = {
type BorderSafeStyle (line 46) | type BorderSafeStyle = BorderExpandedStyle & {
type BorderStyle (line 57) | type BorderStyle = BorderShorthandStyle & BorderExpandedStyle;
type FlexboxShorthandStyle (line 61) | type FlexboxShorthandStyle = {
type AlignContent (line 65) | type AlignContent =
type AlignItems (line 74) | type AlignItems =
type AlignSelf (line 81) | type AlignSelf =
type FlexDirection (line 89) | type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
type FlexWrap (line 91) | type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
type JustifyContent (line 93) | type JustifyContent =
type JustifySelf (line 101) | type JustifySelf = string;
type FlexboxExpandedStyle (line 103) | type FlexboxExpandedStyle = {
type FlexboxSafeStyle (line 117) | type FlexboxSafeStyle = FlexboxExpandedStyle & {
type FlexboxStyle (line 122) | type FlexboxStyle = FlexboxShorthandStyle & FlexboxExpandedStyle;
type GapShorthandStyle (line 126) | type GapShorthandStyle = {
type GapExpandedStyle (line 130) | type GapExpandedStyle = {
type GapSafeStyle (line 135) | type GapSafeStyle = {
type GapStyle (line 140) | type GapStyle = GapShorthandStyle & GapExpandedStyle;
type PositionShorthandStyle (line 144) | type PositionShorthandStyle = {
type PositionExpandedStyle (line 148) | type PositionExpandedStyle = {
type PositionSafeStyle (line 154) | type PositionSafeStyle = PositionExpandedStyle & {
type PositioningStyle (line 159) | type PositioningStyle = PositionShorthandStyle & PositionExpandedStyle;
type ScaleTransform (line 163) | type ScaleTransform = {
type TranslateTransform (line 168) | type TranslateTransform = {
type RotateTransform (line 173) | type RotateTransform = {
type SkewTransform (line 178) | type SkewTransform = {
type MatrixTransform (line 183) | type MatrixTransform = {
type Transform (line 188) | type Transform =
type TransformShorthandStyle (line 195) | type TransformShorthandStyle = {
type TransformExpandedStyle (line 199) | type TransformExpandedStyle = {
type TransformSafeStyle (line 206) | type TransformSafeStyle = Omit<TransformExpandedStyle, 'transform'> & {
type TransformStyle (line 213) | type TransformStyle = TransformShorthandStyle & TransformExpandedStyle;
type Display (line 217) | type Display = 'flex' | 'none';
type Position (line 219) | type Position = 'absolute' | 'relative' | 'static';
type LayoutStyle (line 221) | type LayoutStyle = {
type LayoutExpandedStyle (line 233) | type LayoutExpandedStyle = LayoutStyle;
type LayoutSafeStyle (line 235) | type LayoutSafeStyle = LayoutExpandedStyle & {
type DimensionStyle (line 246) | type DimensionStyle = {
type DimensionExpandedStyle (line 255) | type DimensionExpandedStyle = DimensionStyle;
type DimensionSafeStyle (line 257) | type DimensionSafeStyle = DimensionExpandedStyle & {
type ColorStyle (line 268) | type ColorStyle = {
type ColorExpandedStyle (line 274) | type ColorExpandedStyle = ColorStyle;
type ColorSafeStyle (line 276) | type ColorSafeStyle = {
type FontStyle (line 284) | type FontStyle = 'normal' | 'italic' | 'oblique';
type FontWeight (line 286) | type FontWeight =
type TextAlign (line 304) | type TextAlign = 'left' | 'right' | 'center' | 'justify';
type TextDecoration (line 306) | type TextDecoration =
type TextDecorationStyle (line 313) | type TextDecorationStyle = 'dashed' | 'dotted' | 'solid' | string;
type TextTransform (line 315) | type TextTransform =
type VerticalAlign (line 322) | type VerticalAlign = 'sub' | 'super';
type TextStyle (line 324) | type TextStyle = {
type TextExpandedStyle (line 343) | type TextExpandedStyle = TextStyle;
type TextSafeStyle (line 345) | type TextSafeStyle = TextExpandedStyle & {
type MarginShorthandStyle (line 354) | type MarginShorthandStyle = {
type MarginExpandedStyle (line 360) | type MarginExpandedStyle = {
type MarginSafeStyle (line 367) | type MarginSafeStyle = MarginExpandedStyle & {
type MarginStyle (line 374) | type MarginStyle = MarginShorthandStyle & MarginExpandedStyle;
type PaddingShorthandStyle (line 378) | type PaddingShorthandStyle = {
type PaddingExpandedStyle (line 384) | type PaddingExpandedStyle = {
type PaddingSafeStyle (line 391) | type PaddingSafeStyle = PaddingExpandedStyle & {
type PaddingStyle (line 398) | type PaddingStyle = PaddingShorthandStyle & PaddingExpandedStyle;
type SvgStyle (line 402) | interface SvgStyle {
type SvgExpandedStyle (line 425) | type SvgExpandedStyle = SvgStyle;
type SvgSafeStyle (line 427) | type SvgSafeStyle = SvgStyle & {
type BaseStyle (line 435) | type BaseStyle = BorderStyle &
type MediaQueryStyle (line 448) | type MediaQueryStyle = {
type Style (line 452) | type Style = BaseStyle & MediaQueryStyle;
type StyleKey (line 454) | type StyleKey = keyof BaseStyle;
type ExpandedStyle (line 456) | type ExpandedStyle = BorderExpandedStyle &
type SafeStyle (line 469) | type SafeStyle = BorderSafeStyle &
FILE: packages/stylesheet/src/utils/units.ts
type Unit (line 3) | type Unit = 'in' | 'mm' | 'cm' | 'pt' | 'vh' | 'vw' | 'px' | 'rem';
type ParsedValue (line 5) | type ParsedValue =
constant VALUE_REGEX (line 9) | const VALUE_REGEX = /^(-?\d*\.?\d+)(in|mm|cm|pt|vh|vw|px|rem)?$/;
constant DEFAULT_DPI (line 11) | const DEFAULT_DPI = 72;
constant DEFAULT_REM_BASE (line 12) | const DEFAULT_REM_BASE = 18;
constant MM_PER_INCH (line 13) | const MM_PER_INCH = 25.4;
constant CM_PER_INCH (line 14) | const CM_PER_INCH = 2.54;
FILE: packages/textkit/src/attributedString/trim.ts
constant WHITESPACE_REGEX (line 4) | const WHITESPACE_REGEX = /\S/;
FILE: packages/textkit/src/engines/fontSubstitution/index.ts
constant IGNORED_CODE_POINTS (line 4) | const IGNORED_CODE_POINTS = [173];
FILE: packages/textkit/src/engines/index.ts
type Engines (line 9) | type Engines = {
FILE: packages/textkit/src/engines/justification/getDistances.ts
constant KASHIDA_PRIORITY (line 3) | const KASHIDA_PRIORITY = 0;
constant NULL_PRIORITY (line 4) | const NULL_PRIORITY = 3;
FILE: packages/textkit/src/engines/justification/getFactors.ts
type Direction (line 5) | enum Direction {
constant WHITESPACE_PRIORITY (line 10) | const WHITESPACE_PRIORITY = 1;
constant LETTER_PRIORITY (line 11) | const LETTER_PRIORITY = 2;
constant EXPAND_WHITESPACE_FACTOR (line 13) | const EXPAND_WHITESPACE_FACTOR = {
constant EXPAND_CHAR_FACTOR (line 20) | const EXPAND_CHAR_FACTOR = {
constant SHRINK_WHITESPACE_FACTOR (line 27) | const SHRINK_WHITESPACE_FACTOR = {
constant SHRINK_CHAR_FACTOR (line 34) | const SHRINK_CHAR_FACTOR = {
FILE: packages/textkit/src/engines/justification/types.ts
type Factor (line 1) | type Factor = {
FILE: packages/textkit/src/engines/linebreaker/bestFit.ts
constant INFINITY (line 3) | const INFINITY = 10000;
FILE: packages/textkit/src/engines/linebreaker/index.ts
constant HYPHEN (line 9) | const HYPHEN = 0x002d;
constant TOLERANCE_STEPS (line 10) | const TOLERANCE_STEPS = 5;
constant TOLERANCE_LIMIT (line 11) | const TOLERANCE_LIMIT = 50;
FILE: packages/textkit/src/engines/linebreaker/knuthPlass.ts
type Sum (line 10) | type Sum = {
function breakpoint (line 16) | function breakpoint(
function computeCost (line 38) | function computeCost(
function computeSum (line 89) | function computeSum(nodes: Node[], sum: Sum, breakPointIndex: number) {
function findBestBreakpoints (line 116) | function findBestBreakpoints(activeNodes) {
function mainLoop (line 170) | function mainLoop(node: Node, index: number, nodes: Node[]) {
FILE: packages/textkit/src/engines/linebreaker/linkedList.ts
class LinkedListNode (line 2) | class LinkedListNode {
method constructor (line 7) | constructor(data: any) {
class LinkedList (line 14) | class LinkedList {
method constructor (line 22) | constructor() {
method isLinked (line 29) | isLinked(node: LinkedListNode) {
method size (line 40) | size() {
method isEmpty (line 44) | isEmpty() {
method first (line 48) | first() {
method last (line 52) | last() {
method forEach (line 56) | forEach(callback: (node: LinkedListNode) => void) {
method at (line 65) | at(i: number) {
method insertAfter (line 83) | insertAfter(node: LinkedListNode, newNode: LinkedListNode) {
method insertBefore (line 102) | insertBefore(node: LinkedListNode, newNode: LinkedListNode) {
method push (line 121) | push(node: LinkedListNode) {
method unshift (line 131) | unshift(node: LinkedListNode) {
method remove (line 145) | remove(node: LinkedListNode) {
FILE: packages/textkit/src/engines/linebreaker/types.ts
type LinebreakOptions (line 1) | type LinebreakOptions = {
type PenaltyNode (line 5) | type PenaltyNode = {
type BoxNode (line 12) | type BoxNode = {
type GlueNode (line 20) | type GlueNode = {
type Node (line 29) | type Node = PenaltyNode | BoxNode | GlueNode;
FILE: packages/textkit/src/engines/textDecoration/index.ts
constant BASE_FONT_SIZE (line 8) | const BASE_FONT_SIZE = 12;
FILE: packages/textkit/src/engines/wordHyphenation/index.ts
constant SOFT_HYPHEN (line 5) | const SOFT_HYPHEN = '\u00ad';
FILE: packages/textkit/src/glyph/isWhiteSpace.ts
constant SPACE_CODE (line 8) | const SPACE_CODE = 32;
FILE: packages/textkit/src/layout/finalizeFragments.ts
constant ALIGNMENT_FACTORS (line 14) | const ALIGNMENT_FACTORS = { center: 0.5, right: 1 };
FILE: packages/textkit/src/layout/layoutParagraph.ts
constant ATTACHMENT_CODE (line 13) | const ATTACHMENT_CODE = '\ufffc';
type layoutParagraphEngines (line 74) | type layoutParagraphEngines = Pick<Engines, 'linebreaker'>;
FILE: packages/textkit/src/layout/preprocessRuns.ts
type ProcessRunsEngines (line 19) | type ProcessRunsEngines = Pick<
FILE: packages/textkit/src/layout/resolveAttachments.ts
constant ATTACHMENT_CODE (line 3) | const ATTACHMENT_CODE = 0xfffc;
FILE: packages/textkit/src/layout/wrapWords.ts
constant SOFT_HYPHEN (line 5) | const SOFT_HYPHEN = '\u00ad';
FILE: packages/textkit/src/paragraph/truncate.ts
constant ELLIPSIS_UNICODE (line 7) | const ELLIPSIS_UNICODE = 8230;
constant ELLIPSIS_STRING (line 8) | const ELLIPSIS_STRING = String.fromCharCode(ELLIPSIS_UNICODE);
FILE: packages/textkit/src/rect/bottomLeft.ts
constant ZERO (line 4) | const ZERO = { x: 0, y: 0 };
FILE: packages/textkit/src/rect/bottomRight.ts
constant ZERO (line 5) | const ZERO = { x: 0, y: 0 };
FILE: packages/textkit/src/run/flatten.ts
type Point (line 5) | type Point = ['start' | 'end', number, Attributes, number];
FILE: packages/textkit/src/types.ts
type Coordinate (line 5) | type Coordinate = {
type Rect (line 10) | type Rect = {
type Container (line 17) | type Container = Rect & {
type Glyph (line 23) | type Glyph = FontkitGlyph;
type Position (line 25) | type Position = {
type Attachment (line 34) | type Attachment = {
type Attributes (line 44) | type Attributes = {
type Run (line 87) | type Run = {
type DecorationLine (line 101) | type DecorationLine = {
type AttributedString (line 108) | type AttributedString = {
type Fragment (line 122) | type Fragment = {
type Paragraph (line 127) | type Paragraph = AttributedString[];
type LayoutOptions (line 129) | type LayoutOptions = {
FILE: packages/textkit/tests/layout/applyDefaultStyles.test.ts
constant DEFAULTS (line 9) | const DEFAULTS = {
constant OVERRIDES (line 44) | const OVERRIDES = {
FILE: packages/types/bookmark.d.ts
type ExpandedBookmark (line 1) | interface ExpandedBookmark {
type Bookmark (line 10) | type Bookmark = string | ExpandedBookmark;
FILE: packages/types/context.d.ts
type DocumentInfo (line 18) | interface DocumentInfo {
type PageOption (line 28) | interface PageOption {
type ImageOption (line 33) | interface ImageOption {
type ColorValue (line 38) | type ColorValue = string;
type Context (line 40) | interface Context {
FILE: packages/types/image.d.ts
type HTTPMethod (line 1) | type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
type SourceURL (line 3) | type SourceURL = string;
type SourceBuffer (line 5) | type SourceBuffer = Buffer;
type SourceBlob (line 7) | type SourceBlob = Blob;
type SourceDataBuffer (line 9) | type SourceDataBuffer = { data: Buffer; format: 'png' | 'jpg' };
type SourceURLObject (line 11) | type SourceURLObject = {
type Source (line 19) | type Source =
type SourceFactory (line 27) | type SourceFactory = () => Source;
type SourceAsync (line 29) | type SourceAsync = Promise<Source>;
type SourceAsyncFactory (line 31) | type SourceAsyncFactory = () => Promise<Source>;
type SourceObject (line 33) | type SourceObject =
FILE: packages/types/node.d.ts
type BaseProps (line 7) | interface BaseProps {
type DynamicRenderCallback (line 16) | type DynamicRenderCallback = (props: {
type TextProps (line 21) | interface TextProps extends BaseProps {
type ViewProps (line 29) | interface ViewProps extends BaseProps {
type PageProps (line 34) | interface PageProps extends BaseProps {
type PageLayout (line 41) | type PageLayout =
type PageMode (line 49) | type PageMode =
type DocumentProps (line 57) | interface DocumentProps {
type TextInstanceNode (line 70) | interface TextInstanceNode {
type TextNode (line 75) | interface TextNode {
type ViewNode (line 83) | interface ViewNode {
type PageNode (line 90) | interface PageNode {
type DocumentNode (line 97) | interface DocumentNode {
type Node (line 103) | type Node = DocumentNode | PageNode | ViewNode;
FILE: packages/types/page.d.ts
type Orientation (line 1) | type Orientation = 'portrait' | 'landscape';
type StandardPageSize (line 3) | type StandardPageSize =
type StaticSize (line 56) | type StaticSize = number | string;
type PageSize (line 58) | type PageSize =
FILE: packages/types/pdf.d.ts
type PDFVersion (line 1) | type PDFVersion = '1.3' | '1.4' | '1.5' | '1.6' | '1.7' | '1.7ext3';
FILE: packages/types/primitive.d.ts
type Primitive (line 3) | enum Primitive {
FILE: packages/types/svg.d.ts
type SVGPresentationAttributes (line 1) | interface SVGPresentationAttributes {
Condensed preview — 831 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,345K chars).
[
{
"path": ".changeset/README.md",
"chars": 510,
"preview": "# Changesets\n\nHello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that wo"
},
{
"path": ".changeset/config.json",
"chars": 397,
"preview": "{\n \"$schema\": \"https://unpkg.com/@changesets/config@2.3.0/schema.json\",\n \"changelog\": [\n \"@changesets/changelog-git"
},
{
"path": ".changeset/dirty-rocks-jam.md",
"chars": 73,
"preview": "---\n\"@react-pdf/textkit\": patch\n---\n\nfeat(textkit): various improvements\n"
},
{
"path": ".changeset/eighty-taxis-cross.md",
"chars": 65,
"preview": "---\n\"@react-pdf/fns\": patch\n---\n\nfeat(fns): various improvements\n"
},
{
"path": ".changeset/five-rockets-battle.md",
"chars": 67,
"preview": "---\n\"@react-pdf/textkit\": patch\n---\n\nfix: cannot read units for Em\n"
},
{
"path": ".changeset/pretty-carrots-obey.md",
"chars": 67,
"preview": "---\n\"@react-pdf/font\": patch\n---\n\nfeat(font): various improvements\n"
},
{
"path": ".gitattributes",
"chars": 70,
"preview": "packages/* linguist-vendored=false\nexamples/* linguist-vendored=false\n"
},
{
"path": ".github/CODE_OF_CONDUCT.md",
"chars": 3222,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 6200,
"preview": "# Contribute\n\n## Introduction\n\nFirst, thank you for considering contributing to react-pdf!\n\nWe welcome any type of contr"
},
{
"path": ".github/FUNDING.yml",
"chars": 45,
"preview": "github: diegomura\nopen_collective: react-pdf\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 859,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n---\n\n**Describe the bu"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 603,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: new feature\nassignees: ''\n---\n\n**Is "
},
{
"path": ".github/no-response.yml",
"chars": 497,
"preview": "# Configuration for probot-no-response - https://github.com/probot/no-response\n\ndaysUntilClose: 14\nresponseRequiredLabel"
},
{
"path": ".github/workflows/main.yml",
"chars": 3623,
"preview": "name: CI\n\non:\n pull_request:\n branches:\n - '**'\n push:\n branches:\n - '**'\n\nconcurrency:\n group: ${{ g"
},
{
"path": ".github/workflows/release.yml",
"chars": 2674,
"preview": "name: Release\n\non:\n push:\n branches:\n - master\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n"
},
{
"path": ".gitignore",
"chars": 80,
"preview": "node_modules\n*.log\ndist\ncoverage\n.jshintrc\n.idea\n.DS_Store\n.cache\n.parcel-cache\n"
},
{
"path": ".husky/pre-commit",
"chars": 17,
"preview": "yarn lint-staged\n"
},
{
"path": ".nvmrc",
"chars": 3,
"preview": "18\n"
},
{
"path": ".prettierignore",
"chars": 32,
"preview": "yoga-layout\nlib\npackages/pdfkit\n"
},
{
"path": ".prettierrc",
"chars": 26,
"preview": "{\n \"singleQuote\": true\n}\n"
},
{
"path": "LICENSE",
"chars": 1101,
"preview": "MIT License\n\nCopyright (c) 2017 Diego Muracciole <diegomuracciole@gmail.com>\n\nPermission is hereby granted, free of char"
},
{
"path": "README.md",
"chars": 3736,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "babel.config.js",
"chars": 460,
"preview": "export default {\n presets: [\n [\n '@babel/preset-env',\n {\n loose: true,\n targets: {\n "
},
{
"path": "e2e/node-cjs/CHANGELOG.md",
"chars": 3433,
"preview": "# @react-pdf/e2e-node-cjs\n\n## 2.0.24\n\n### Patch Changes\n\n- Updated dependencies []:\n - @react-pdf/renderer@4.3.2\n\n## 2."
},
{
"path": "e2e/node-cjs/index.js",
"chars": 1243,
"preview": "const fs = require('node:fs/promises');\nconst assert = require('node:assert');\nconst { test } = require('node:test');\nco"
},
{
"path": "e2e/node-cjs/package.json",
"chars": 479,
"preview": "{\n \"name\": \"@react-pdf/e2e-node-cjs\",\n \"version\": \"2.0.24\",\n \"license\": \"MIT\",\n \"private\": true,\n \"type\": \"commonjs"
},
{
"path": "e2e/node-esm/CHANGELOG.md",
"chars": 3433,
"preview": "# @react-pdf/e2e-node-esm\n\n## 2.0.24\n\n### Patch Changes\n\n- Updated dependencies []:\n - @react-pdf/renderer@4.3.2\n\n## 2."
},
{
"path": "e2e/node-esm/index.js",
"chars": 1218,
"preview": "import fs from 'node:fs/promises';\nimport assert from 'node:assert';\nimport { test } from 'node:test';\nimport { jsx } fr"
},
{
"path": "e2e/node-esm/package.json",
"chars": 477,
"preview": "{\n \"name\": \"@react-pdf/e2e-node-esm\",\n \"version\": \"2.0.24\",\n \"license\": \"MIT\",\n \"private\": true,\n \"type\": \"module\","
},
{
"path": "eslint.config.ts",
"chars": 8368,
"preview": "import { version } from 'react';\nimport reactPlugin from 'eslint-plugin-react';\nimport tsPlugin from '@typescript-eslint"
},
{
"path": "lerna.json",
"chars": 116,
"preview": "{\n \"version\": \"independent\",\n \"packages\": [\"packages/*\", \"packages/examples/*\", \"e2e/*\"],\n \"npmClient\": \"yarn\"\n}\n"
},
{
"path": "package.json",
"chars": 3393,
"preview": "{\n \"private\": true,\n \"name\": \"@react-pdf/root\",\n \"version\": \"2.0.0\",\n \"license\": \"MIT\",\n \"author\": \"Diego Muracciol"
},
{
"path": "packages/examples/dev.sh",
"chars": 1197,
"preview": "#!/bin/bash\n\n# Get the directory of the script\nscriptDir=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# Get the list"
},
{
"path": "packages/examples/next-14/.gitignore",
"chars": 391,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "packages/examples/next-14/CHANGELOG.md",
"chars": 2401,
"preview": "# next-14\n\n## 0.1.17\n\n### Patch Changes\n\n- Updated dependencies []:\n - @react-pdf/renderer@4.3.2\n\n## 0.1.16\n\n### Patch "
},
{
"path": "packages/examples/next-14/README.md",
"chars": 1382,
"preview": "This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js"
},
{
"path": "packages/examples/next-14/app/globals.css",
"chars": 59,
"preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
},
{
"path": "packages/examples/next-14/app/layout.js",
"chars": 286,
"preview": "import './globals.css';\n\nexport const metadata = {\n title: 'Create Next App',\n description: 'Generated by create next "
},
{
"path": "packages/examples/next-14/app/page.js",
"chars": 522,
"preview": "'use client';\n\nimport {\n Document,\n Page,\n PDFViewer,\n PDFDownloadLink,\n Text,\n} from '@react-pdf/renderer';\n\nexpor"
},
{
"path": "packages/examples/next-14/jsconfig.json",
"chars": 73,
"preview": "{\n \"compilerOptions\": {\n \"paths\": {\n \"@/*\": [\"./*\"]\n }\n }\n}\n"
},
{
"path": "packages/examples/next-14/next.config.mjs",
"chars": 92,
"preview": "/** @type {import('next').NextConfig} */\nconst nextConfig = {};\n\nexport default nextConfig;\n"
},
{
"path": "packages/examples/next-14/package.json",
"chars": 366,
"preview": "{\n \"name\": \"next-14\",\n \"version\": \"0.1.17\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"next dev\",\n \"start\": \"nex"
},
{
"path": "packages/examples/next-14/postcss.config.mjs",
"chars": 135,
"preview": "/** @type {import('postcss-load-config').Config} */\nconst config = {\n plugins: {\n tailwindcss: {},\n },\n};\n\nexport d"
},
{
"path": "packages/examples/next-14/tailwind.config.js",
"chars": 366,
"preview": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n content: [\n './pages/**/*.{js,ts,jsx,tsx,mdx}',\n "
},
{
"path": "packages/examples/next-15/.gitignore",
"chars": 463,
"preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
},
{
"path": "packages/examples/next-15/CHANGELOG.md",
"chars": 2401,
"preview": "# next-15\n\n## 0.1.17\n\n### Patch Changes\n\n- Updated dependencies []:\n - @react-pdf/renderer@4.3.2\n\n## 0.1.16\n\n### Patch "
},
{
"path": "packages/examples/next-15/README.md",
"chars": 1458,
"preview": "This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/"
},
{
"path": "packages/examples/next-15/app/globals.css",
"chars": 59,
"preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
},
{
"path": "packages/examples/next-15/app/layout.js",
"chars": 286,
"preview": "import './globals.css';\n\nexport const metadata = {\n title: 'Create Next App',\n description: 'Generated by create next "
},
{
"path": "packages/examples/next-15/app/page.js",
"chars": 522,
"preview": "'use client';\n\nimport {\n Document,\n Page,\n PDFViewer,\n PDFDownloadLink,\n Text,\n} from '@react-pdf/renderer';\n\nexpor"
},
{
"path": "packages/examples/next-15/jsconfig.json",
"chars": 73,
"preview": "{\n \"compilerOptions\": {\n \"paths\": {\n \"@/*\": [\"./*\"]\n }\n }\n}\n"
},
{
"path": "packages/examples/next-15/next.config.mjs",
"chars": 92,
"preview": "/** @type {import('next').NextConfig} */\nconst nextConfig = {};\n\nexport default nextConfig;\n"
},
{
"path": "packages/examples/next-15/package.json",
"chars": 372,
"preview": "{\n \"name\": \"next-15\",\n \"version\": \"0.1.17\",\n \"private\": true,\n \"scripts\": {\n \"dev\": \"next dev\",\n \"start\": \"nex"
},
{
"path": "packages/examples/next-15/postcss.config.mjs",
"chars": 135,
"preview": "/** @type {import('postcss-load-config').Config} */\nconst config = {\n plugins: {\n tailwindcss: {},\n },\n};\n\nexport d"
},
{
"path": "packages/examples/next-15/tailwind.config.js",
"chars": 366,
"preview": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n content: [\n './pages/**/*.{js,ts,jsx,tsx,mdx}',\n "
},
{
"path": "packages/examples/package.json",
"chars": 320,
"preview": "{\n \"name\": \"@react-pdf/examples\",\n \"version\": \"0.0.0\",\n \"license\": \"MIT\",\n \"private\": true,\n \"author\": \"Diego Murac"
},
{
"path": "packages/examples/vite/.gitignore",
"chars": 17,
"preview": "lib\nnode_modules\n"
},
{
"path": "packages/examples/vite/CHANGELOG.md",
"chars": 11602,
"preview": "# @react-pdf/examples\n\n## 3.3.20\n\n### Patch Changes\n\n- Updated dependencies []:\n - @react-pdf/renderer@4.3.2\n\n## 3.3.19"
},
{
"path": "packages/examples/vite/README.md",
"chars": 2392,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "packages/examples/vite/declarations.d.ts",
"chars": 284,
"preview": "declare module '*.jpg' {\n const src: string;\n export default src;\n}\n\ndeclare module '*.jpeg' {\n const src: string;\n "
},
{
"path": "packages/examples/vite/package.json",
"chars": 755,
"preview": "{\n \"name\": \"@react-pdf/vite-example\",\n \"version\": \"3.3.20\",\n \"license\": \"MIT\",\n \"private\": true,\n \"author\": \"Diego "
},
{
"path": "packages/examples/vite/postcss.config.js",
"chars": 83,
"preview": "module.exports = {\n plugins: {\n tailwindcss: {},\n autoprefixer: {},\n },\n};\n"
},
{
"path": "packages/examples/vite/src/examples/duplicated-images/index.tsx",
"chars": 1380,
"preview": "import React from 'react';\nimport { Document, Page, Image, StyleSheet } from '@react-pdf/renderer';\n\nimport Quijote1 fro"
},
{
"path": "packages/examples/vite/src/examples/ellipsis/index.tsx",
"chars": 940,
"preview": "import React from 'react';\nimport {\n Document,\n Page,\n Text,\n View,\n StyleSheet,\n Font,\n} from '@react-pdf/rendere"
},
{
"path": "packages/examples/vite/src/examples/emoji/index.tsx",
"chars": 698,
"preview": "import React from 'react';\nimport {\n Document,\n Page,\n View,\n Text,\n Font,\n StyleSheet,\n} from '@react-pdf/rendere"
},
{
"path": "packages/examples/vite/src/examples/font-family-fallback/index.tsx",
"chars": 2543,
"preview": "import React from 'react';\nimport { Document, Page, Text, StyleSheet, Font } from '@react-pdf/renderer';\n\nimport RobotoF"
},
{
"path": "packages/examples/vite/src/examples/font-weight/index.tsx",
"chars": 1567,
"preview": "import React from 'react';\nimport { Document, Page, Text, StyleSheet, Font } from '@react-pdf/renderer';\n\nimport RobotoF"
},
{
"path": "packages/examples/vite/src/examples/forms/index.tsx",
"chars": 2554,
"preview": "import React from 'react';\n\nimport {\n Document,\n Page,\n View,\n Text,\n Checkbox,\n FieldSet,\n TextInput,\n Select,\n"
},
{
"path": "packages/examples/vite/src/examples/fractals/Fractal.tsx",
"chars": 1265,
"preview": "import React from 'react';\nimport { Text, View, StyleSheet } from '@react-pdf/renderer';\n\nconst palette = [\n '#781c81',"
},
{
"path": "packages/examples/vite/src/examples/fractals/index.tsx",
"chars": 483,
"preview": "import React from 'react';\nimport { Page, Document } from '@react-pdf/renderer';\n\nimport Fractal from './Fractal';\n\ncons"
},
{
"path": "packages/examples/vite/src/examples/go-to/index.tsx",
"chars": 494,
"preview": "import React from 'react';\nimport { Page, Document, Link, View, Image } from '@react-pdf/renderer';\n\nconst GoTo = () => "
},
{
"path": "packages/examples/vite/src/examples/image-stress-test/index.tsx",
"chars": 14951,
"preview": "import React from 'react';\nimport { Document, Page, Image } from '@react-pdf/renderer';\n\nconst IMAGES = [\n 'https://ima"
},
{
"path": "packages/examples/vite/src/examples/index.ts",
"chars": 1223,
"preview": "import duplicatedImages from './duplicated-images';\nimport ellipsis from './ellipsis';\nimport emoji from './emoji';\nimpo"
},
{
"path": "packages/examples/vite/src/examples/jpg-orientation/index.tsx",
"chars": 1394,
"preview": "import React from 'react';\nimport { Document, Page, Image, View } from '@react-pdf/renderer';\n\nimport Orientation1 from "
},
{
"path": "packages/examples/vite/src/examples/knobs/index.tsx",
"chars": 1705,
"preview": "import React from 'react';\nimport { Document, Page, View, Text, StyleSheet } from '@react-pdf/renderer';\n\nconst styles ="
},
{
"path": "packages/examples/vite/src/examples/link/index.tsx",
"chars": 772,
"preview": "import React from 'react';\nimport { Document, Page, Link, Text, View } from '@react-pdf/renderer';\n\nconst LinkExample = "
},
{
"path": "packages/examples/vite/src/examples/media-queries/index.tsx",
"chars": 971,
"preview": "import React from 'react';\nimport { Document, Page, View, StyleSheet } from '@react-pdf/renderer';\n\nconst styles = Style"
},
{
"path": "packages/examples/vite/src/examples/min-presence-ahead/index.tsx",
"chars": 1035,
"preview": "import React from 'react';\nimport { Document, Page, View, Text } from '@react-pdf/renderer';\n\nconst palette = [\n '#781c"
},
{
"path": "packages/examples/vite/src/examples/multiline-text/index.tsx",
"chars": 971,
"preview": "import React from 'react';\nimport { Document, Page, View, Text, StyleSheet } from '@react-pdf/renderer';\n\nconst styles ="
},
{
"path": "packages/examples/vite/src/examples/object-fit/index.tsx",
"chars": 1424,
"preview": "import React from 'react';\nimport {\n Document,\n Page,\n View,\n Image,\n Text,\n StyleSheet,\n} from '@react-pdf/render"
},
{
"path": "packages/examples/vite/src/examples/page-wrap/index.tsx",
"chars": 12387,
"preview": "import React from 'react';\nimport {\n Document,\n Font,\n Text,\n Page,\n Image,\n StyleSheet,\n} from '@react-pdf/render"
},
{
"path": "packages/examples/vite/src/examples/resume/Education.tsx",
"chars": 690,
"preview": "import React from 'react';\nimport { Text, View, StyleSheet } from '@react-pdf/renderer';\n\nimport Title from './Title';\n\n"
},
{
"path": "packages/examples/vite/src/examples/resume/Experience.tsx",
"chars": 3808,
"preview": "import React from 'react';\nimport { Text, View, StyleSheet } from '@react-pdf/renderer';\n\nimport Title from './Title';\ni"
},
{
"path": "packages/examples/vite/src/examples/resume/Header.tsx",
"chars": 1246,
"preview": "import React from 'react';\nimport { Link, Text, View, StyleSheet } from '@react-pdf/renderer';\n\nconst styles = StyleShee"
},
{
"path": "packages/examples/vite/src/examples/resume/List.tsx",
"chars": 571,
"preview": "import React from 'react';\nimport { Text, View, StyleSheet } from '@react-pdf/renderer';\n\nconst styles = StyleSheet.crea"
},
{
"path": "packages/examples/vite/src/examples/resume/Skills.tsx",
"chars": 1034,
"preview": "import React from 'react';\nimport { Text, View, StyleSheet } from '@react-pdf/renderer';\n\nimport Title from './Title';\ni"
},
{
"path": "packages/examples/vite/src/examples/resume/Title.tsx",
"chars": 342,
"preview": "import React from 'react';\nimport { Text, StyleSheet } from '@react-pdf/renderer';\n\nconst styles = StyleSheet.create({\n "
},
{
"path": "packages/examples/vite/src/examples/resume/index.tsx",
"chars": 2521,
"preview": "import React from 'react';\nimport {\n Text,\n Font,\n Page,\n View,\n Image,\n Document,\n StyleSheet,\n} from '@react-pd"
},
{
"path": "packages/examples/vite/src/examples/soft-hyphens/index.tsx",
"chars": 747,
"preview": "import React from 'react';\nimport { Document, Page, Font, Text, StyleSheet } from '@react-pdf/renderer';\n\nconst shy = '\\"
},
{
"path": "packages/examples/vite/src/examples/svg/Car.tsx",
"chars": 320894,
"preview": "import * as React from 'react';\nimport {\n Svg,\n Defs,\n LinearGradient,\n RadialGradient,\n Stop,\n Path,\n G,\n} from "
},
{
"path": "packages/examples/vite/src/examples/svg/Heart.tsx",
"chars": 471,
"preview": "import React from 'react';\n\nimport { Svg, G, Path } from '@react-pdf/renderer';\n\nconst Heart = () => (\n <Svg viewBox=\"-"
},
{
"path": "packages/examples/vite/src/examples/svg/Pattern.tsx",
"chars": 204973,
"preview": "import React from 'react';\nimport { Svg, G, Path } from '@react-pdf/renderer';\n\nconst Chart = () => {\n return (\n <Sv"
},
{
"path": "packages/examples/vite/src/examples/svg/Star.tsx",
"chars": 730,
"preview": "import React from 'react';\n\nimport { Svg, Path } from '@react-pdf/renderer';\n\nconst Star = () => (\n <Svg width={16} hei"
},
{
"path": "packages/examples/vite/src/examples/svg/Svg1.tsx",
"chars": 4216,
"preview": "import React from 'react';\nimport { Rect, Svg, G, Path, Text, Tspan } from '@react-pdf/renderer';\n\nconst Svg1 = () => (\n"
},
{
"path": "packages/examples/vite/src/examples/svg/Svg2.tsx",
"chars": 33805,
"preview": "import React from 'react';\nimport {\n Rect,\n Svg,\n G,\n Path,\n Text,\n Defs,\n ClipPath,\n Tspan,\n LinearGradient,\n "
},
{
"path": "packages/examples/vite/src/examples/svg/Svg4.tsx",
"chars": 714,
"preview": "import React from 'react';\nimport {\n Svg,\n Stop,\n Defs,\n Circle,\n LinearGradient,\n RadialGradient,\n} from '@react-"
},
{
"path": "packages/examples/vite/src/examples/svg/index.tsx",
"chars": 807,
"preview": "import React from 'react';\nimport { Document, Page, StyleSheet } from '@react-pdf/renderer';\n\nimport Svg0 from './svg';\n"
},
{
"path": "packages/examples/vite/src/examples/svg/svg.tsx",
"chars": 18705,
"preview": "import React from 'react';\nimport { Svg, G, Polygon } from '@react-pdf/renderer';\n\nconst Tiger = () => (\n <Svg style={{"
},
{
"path": "packages/examples/vite/src/examples/svg-transform/index.tsx",
"chars": 920,
"preview": "import React from 'react';\nimport { Document, Page, Svg, G, Rect } from '@react-pdf/renderer';\n\nconst COLORS = ['red', '"
},
{
"path": "packages/examples/vite/src/examples/transform-origin/index.tsx",
"chars": 1422,
"preview": "import React from 'react';\nimport { Document, Page, View } from '@react-pdf/renderer';\n\nconst Box = ({ origin }) => (\n "
},
{
"path": "packages/examples/vite/src/index.css",
"chars": 59,
"preview": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
},
{
"path": "packages/examples/vite/src/index.html",
"chars": 358,
"preview": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href=\"/"
},
{
"path": "packages/examples/vite/src/index.tsx",
"chars": 1544,
"preview": "import './index.css';\n\nimport React, { useEffect, useState } from 'react';\nimport { createRoot } from 'react-dom/client'"
},
{
"path": "packages/examples/vite/tailwind.config.js",
"chars": 176,
"preview": "/** @type {import('tailwindcss').Config} */\nmodule.exports = {\n content: ['./src/index.html', './src/**/*.{js,ts,jsx,ts"
},
{
"path": "packages/examples/vite/vite.config.js",
"chars": 166,
"preview": "import { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react';\n\n// https://vitejs.dev/config/\nexport def"
},
{
"path": "packages/fns/.gitignore",
"chars": 4,
"preview": "lib\n"
},
{
"path": "packages/fns/CHANGELOG.md",
"chars": 3217,
"preview": "# @react-pdf/fns\n\n## 3.1.2\n\n### Patch Changes\n\n- [#3092](https://github.com/diegomura/react-pdf/pull/3092) [`481b536f`]("
},
{
"path": "packages/fns/README.md",
"chars": 5574,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "packages/fns/jest.config.js",
"chars": 58,
"preview": "export default {\n testRegex: 'tests/.*?(test)\\\\.js$',\n};\n"
},
{
"path": "packages/fns/package.json",
"chars": 610,
"preview": "{\n \"name\": \"@react-pdf/fns\",\n \"version\": \"3.1.2\",\n \"license\": \"MIT\",\n \"description\": \"React-pdf helper functions\",\n "
},
{
"path": "packages/fns/rollup.config.js",
"chars": 458,
"preview": "import typescript from '@rollup/plugin-typescript';\nimport { dts } from 'rollup-plugin-dts';\nimport del from 'rollup-plu"
},
{
"path": "packages/fns/src/adjust.ts",
"chars": 622,
"preview": "/**\n * Applies a function to the value at the given index of an array\n *\n * @param index\n * @param fn\n * @param collecti"
},
{
"path": "packages/fns/src/asyncCompose.ts",
"chars": 1085,
"preview": "/* eslint-disable no-await-in-loop */\n\ntype Fn = (arg: any, ...args: any[]) => Promise<any> | any;\n\ntype ComposedInput<T"
},
{
"path": "packages/fns/src/capitalize.ts",
"chars": 293,
"preview": "/**\n * Capitalize first letter of each word\n *\n * @param value - Any string\n * @returns Capitalized string\n */\nconst cap"
},
{
"path": "packages/fns/src/castArray.ts",
"chars": 333,
"preview": "/**\n * Casts value to array\n *\n * @template T - The type of the value.\n * @param value - The value to cast into an array"
},
{
"path": "packages/fns/src/compose.ts",
"chars": 825,
"preview": "type Fn = (arg: any, ...args: any[]) => any;\n\ntype ComposedInput<T extends Fn[]> = T extends [\n ...any,\n (arg: infer A"
},
{
"path": "packages/fns/src/dropLast.ts",
"chars": 390,
"preview": "/**\n * Drops the last element from an array or string.\n *\n * @param value - The array or string to drop the last element"
},
{
"path": "packages/fns/src/evolve.ts",
"chars": 903,
"preview": "/**\n * Applies a set of transformations to an object and returns a new object with the transformed values.\n *\n * @exampl"
},
{
"path": "packages/fns/src/get.ts",
"chars": 934,
"preview": "import isNil from './isNil.js';\nimport castArray from './castArray.js';\n\n/**\n * Retrieves the value at a given path from"
},
{
"path": "packages/fns/src/index.ts",
"chars": 981,
"preview": "export { default as adjust } from './adjust.js';\nexport { default as asyncCompose } from './asyncCompose.js';\nexport { d"
},
{
"path": "packages/fns/src/isNil.ts",
"chars": 393,
"preview": "/**\n * Checks if a value is null or undefined.\n *\n * @example\n * isNil(null) // => true\n * isNil(undefined) // => t"
},
{
"path": "packages/fns/src/last.ts",
"chars": 529,
"preview": "/**\n * Returns the last element of an array or last character of a string.\n *\n * @example\n * last([1, 2, 3]) // => 3\n * "
},
{
"path": "packages/fns/src/mapValues.ts",
"chars": 730,
"preview": "type IteratorFn = (value: any, key: string, index: number) => any;\n\n/**\n * Maps over the values of an object and applies"
},
{
"path": "packages/fns/src/matchPercent.ts",
"chars": 814,
"preview": "interface PercentMatch {\n percent: number;\n value: number;\n}\n\nconst PERCENT_REGEX = /(-?\\d+\\.?\\d*)%/;\n\n/**\n * Parses a"
},
{
"path": "packages/fns/src/omit.ts",
"chars": 674,
"preview": "import castArray from './castArray';\n\n/**\n * Creates a new object by omitting specified keys from the original object.\n "
},
{
"path": "packages/fns/src/parseFloat.ts",
"chars": 568,
"preview": "/**\n * Parse a string or number to a float. Non-string values pass through unchanged.\n *\n * @example\n * parseFloat('3.14"
},
{
"path": "packages/fns/src/pick.ts",
"chars": 697,
"preview": "/**\n * Picks the specified keys from an object and returns a new object with only those keys.\n *\n * @example\n * pick(['a"
},
{
"path": "packages/fns/src/repeat.ts",
"chars": 549,
"preview": "/**\n * Repeats an element a specified number of times.\n *\n * @example\n * repeat('a', 3) // => ['a', 'a', 'a']\n * repeat("
},
{
"path": "packages/fns/src/reverse.ts",
"chars": 363,
"preview": "/**\n * Returns a new array with elements in reverse order. Does not mutate the original.\n *\n * @example\n * reverse([1, 2"
},
{
"path": "packages/fns/src/upperFirst.ts",
"chars": 642,
"preview": "/**\n * Converts the first character of a string to uppercase. Does not affect other characters.\n *\n * @example\n * upperF"
},
{
"path": "packages/fns/src/without.ts",
"chars": 587,
"preview": "/**\n * Returns a new array excluding the specified values.\n *\n * @example\n * without([2, 4], [1, 2, 3, 4, 5]) // => [1, "
},
{
"path": "packages/fns/tests/adjust.test.ts",
"chars": 2245,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport adjust from '../src/adjust';\n\nconst add = (v: number) => v + 1;"
},
{
"path": "packages/fns/tests/asyncCompose.test.ts",
"chars": 2608,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport asyncCompose from '../src/asyncCompose';\n\ndescribe('asyncCompos"
},
{
"path": "packages/fns/tests/capitalize.test.ts",
"chars": 1545,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport capitalize from '../src/capitalize';\n\ndescribe('capitalize', ()"
},
{
"path": "packages/fns/tests/castArray.test.ts",
"chars": 1060,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport castArray from '../src/castArray';\n\ndescribe('castArray', () =>"
},
{
"path": "packages/fns/tests/compose.test.ts",
"chars": 1472,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport compose from '../src/compose';\n\ndescribe('compose', () => {\n t"
},
{
"path": "packages/fns/tests/dropLast.test.ts",
"chars": 1040,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport dropLast from '../src/dropLast';\n\ndescribe('dropLast', () => {\n"
},
{
"path": "packages/fns/tests/evolve.test.ts",
"chars": 1638,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport evolve from '../src/evolve';\n\nconst add = (a: number) => (b: nu"
},
{
"path": "packages/fns/tests/get.test.ts",
"chars": 2601,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport get from '../src/get';\n\ndescribe('get', () => {\n const deepObj"
},
{
"path": "packages/fns/tests/isNil.test.ts",
"chars": 653,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport isNil from '../src/isNil';\n\ndescribe('isNil', () => {\n test('s"
},
{
"path": "packages/fns/tests/last.test.ts",
"chars": 1017,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport last from '../src/last';\n\ndescribe('last', () => {\n test('retu"
},
{
"path": "packages/fns/tests/mapValues.test.ts",
"chars": 1376,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport mapValues from '../src/mapValues';\n\ndescribe('mapValues', () =>"
},
{
"path": "packages/fns/tests/matchPercent.test.ts",
"chars": 2036,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport matchPercent from '../src/matchPercent';\n\ndescribe('match perce"
},
{
"path": "packages/fns/tests/omit.test.ts",
"chars": 1234,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport omit from '../src/omit';\n\ndescribe('omit', () => {\n const obj "
},
{
"path": "packages/fns/tests/parseFloat.test.ts",
"chars": 1367,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport parseFloat from '../src/parseFloat';\n\ndescribe('parseFloat', ()"
},
{
"path": "packages/fns/tests/pick.test.ts",
"chars": 1368,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport pick from '../src/pick';\n\ndescribe('pick', () => {\n const obj "
},
{
"path": "packages/fns/tests/repeat.test.ts",
"chars": 1169,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport repeat from '../src/repeat';\n\ndescribe('repeat', () => {\n test"
},
{
"path": "packages/fns/tests/reverse.test.ts",
"chars": 994,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport reverse from '../src/reverse';\n\ndescribe('reverse', () => {\n t"
},
{
"path": "packages/fns/tests/upperFirst.test.ts",
"chars": 1235,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport upperFirst from '../src/upperFirst';\n\ndescribe('upperFirst', ()"
},
{
"path": "packages/fns/tests/without.test.ts",
"chars": 1349,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport without from '../src/without';\n\ndescribe('without', () => {\n c"
},
{
"path": "packages/fns/tsconfig.json",
"chars": 495,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"declaration\": t"
},
{
"path": "packages/font/.gitignore",
"chars": 4,
"preview": "lib\n"
},
{
"path": "packages/font/CHANGELOG.md",
"chars": 11896,
"preview": "# @react-pdf/font\n\n## 4.0.4\n\n### Patch Changes\n\n- Updated dependencies [[`f034491b`](https://github.com/diegomura/react-"
},
{
"path": "packages/font/README.md",
"chars": 6720,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "packages/font/declarations.d.ts",
"chars": 199,
"preview": "import type { Font, FontCollection } from 'fontkit';\n\ndeclare module 'fontkit' {\n export function create(\n buffer: U"
},
{
"path": "packages/font/globals.d.ts",
"chars": 57,
"preview": "declare global {\n const BROWSER: boolean;\n}\n\nexport {};\n"
},
{
"path": "packages/font/package.json",
"chars": 971,
"preview": "{\n \"name\": \"@react-pdf/font\",\n \"version\": \"4.0.4\",\n \"license\": \"MIT\",\n \"description\": \"Register font and emoji sourc"
},
{
"path": "packages/font/rollup.config.js",
"chars": 1015,
"preview": "import { dts } from 'rollup-plugin-dts';\nimport del from 'rollup-plugin-delete';\nimport typescript from '@rollup/plugin-"
},
{
"path": "packages/font/src/font-family.ts",
"chars": 2673,
"preview": "import FontSource from './font-source';\nimport { FontDescriptor, FontWeight, SingleLoad } from './types';\n\nconst FONT_WE"
},
{
"path": "packages/font/src/font-source.ts",
"chars": 2540,
"preview": "import isUrl from 'is-url';\nimport * as fontkit from 'fontkit';\n\nimport { Font, FontSourceOptions, FontStyle, RemoteOpti"
},
{
"path": "packages/font/src/index.ts",
"chars": 4998,
"preview": "import FontFamily from './font-family';\n\nimport {\n BulkLoad,\n EmojiSource,\n FontDescriptor,\n HyphenationCallback,\n "
},
{
"path": "packages/font/src/standard-font.ts",
"chars": 4756,
"preview": "// @ts-expect-error ts being silly\nimport { PDFFont } from '@react-pdf/pdfkit';\nimport * as fontkit from 'fontkit';\nimpo"
},
{
"path": "packages/font/src/types.ts",
"chars": 1392,
"preview": "import * as fontkit from 'fontkit';\n\nexport type Font = Omit<fontkit.Font, 'type'> & {\n type: 'TTF' | 'WOFF' | 'WOFF2' "
},
{
"path": "packages/font/tests/fallback-weights.test.ts",
"chars": 8514,
"preview": "import { describe, expect, it } from 'vitest';\n\nimport FontStore from '../src';\n\ndescribe('fallback weights', () => {\n "
},
{
"path": "packages/font/tests/font-store.test.ts",
"chars": 4373,
"preview": "import { describe, expect, it } from 'vitest';\n\nimport FontStore from '../src/index';\n\ndescribe('font store', () => {\n "
},
{
"path": "packages/font/tests/standard-fonts.test.ts",
"chars": 6688,
"preview": "import { describe, expect, it } from 'vitest';\n\nimport FontStore from '../src/index';\n\ndescribe('standard fonts', () => "
},
{
"path": "packages/font/tsconfig.json",
"chars": 508,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"declaration\": t"
},
{
"path": "packages/image/.gitignore",
"chars": 4,
"preview": "lib\n"
},
{
"path": "packages/image/CHANGELOG.md",
"chars": 7494,
"preview": "# @react-pdf/image\n\n## 3.0.4\n\n### Patch Changes\n\n- [#3183](https://github.com/diegomura/react-pdf/pull/3183) [`a5979c15`"
},
{
"path": "packages/image/README.md",
"chars": 3364,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "packages/image/declarations.d.ts",
"chars": 254,
"preview": "declare module 'jay-peg' {\n export function decode(data: Buffer): any;\n export default { decode };\n}\n\ndeclare module '"
},
{
"path": "packages/image/globals.d.ts",
"chars": 57,
"preview": "declare global {\n const BROWSER: boolean;\n}\n\nexport {};\n"
},
{
"path": "packages/image/package.json",
"chars": 833,
"preview": "{\n \"name\": \"@react-pdf/image\",\n \"version\": \"3.0.4\",\n \"license\": \"MIT\",\n \"description\": \"Parses the images in png or "
},
{
"path": "packages/image/rollup.config.js",
"chars": 1340,
"preview": "import { dts } from 'rollup-plugin-dts';\nimport del from 'rollup-plugin-delete';\nimport typescript from '@rollup/plugin-"
},
{
"path": "packages/image/src/cache.ts",
"chars": 556,
"preview": "const createCache = <T>({ limit = 100 } = {}) => {\n let cache = new Map<string, T>();\n\n return {\n get: (key: string"
},
{
"path": "packages/image/src/index.ts",
"chars": 117,
"preview": "import resolveImage from './resolve';\n\nexport type { Image, ImageSrc } from './types';\n\nexport default resolveImage;\n"
},
{
"path": "packages/image/src/jpeg.ts",
"chars": 1022,
"preview": "import _JPEG from 'jay-peg';\n\nimport { Image } from './types';\n\nclass JPEG implements Image {\n data: Buffer;\n width: n"
},
{
"path": "packages/image/src/png.ts",
"chars": 668,
"preview": "import _PNG from '@react-pdf/png-js';\n\nimport { Image } from './types';\n\nclass PNG implements Image {\n data: Buffer;\n "
},
{
"path": "packages/image/src/resolve.ts",
"chars": 5312,
"preview": "import fs from 'fs';\nimport url from 'url';\nimport path from 'path';\n\nimport PNG from './png';\nimport JPEG from './jpeg'"
},
{
"path": "packages/image/src/types.ts",
"chars": 740,
"preview": "export interface Image {\n width: number;\n height: number;\n data: Buffer;\n format: 'jpeg' | 'png';\n key?: string;\n}\n"
},
{
"path": "packages/image/tests/cache.test.ts",
"chars": 2769,
"preview": "import { describe, expect, test } from 'vitest';\n\nimport createCache from '../src/cache.js';\n\ndescribe('Background', () "
},
{
"path": "packages/image/tests/resolve.test.ts",
"chars": 10162,
"preview": "import { beforeEach, describe, expect, test } from 'vitest';\nimport fs from 'fs';\nimport path from 'path';\nimport url fr"
},
{
"path": "packages/image/tests/types.ts",
"chars": 1902,
"preview": "/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-namespace */\n\nimport Glob"
},
{
"path": "packages/image/tsconfig.json",
"chars": 508,
"preview": "{\n \"$schema\": \"https://json.schemastore.org/tsconfig\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"declaration\": t"
},
{
"path": "packages/image/vitest.config.js",
"chars": 205,
"preview": "import { defineConfig } from 'vitest/config';\n\nexport default defineConfig({\n test: {\n setupFiles: ['vitest.setup.js"
},
{
"path": "packages/image/vitest.setup.js",
"chars": 172,
"preview": "import { vi } from 'vitest';\nimport createFetchMock from 'vitest-fetch-mock';\n\nconst fetchMocker = createFetchMock(vi);\n"
},
{
"path": "packages/layout/.gitignore",
"chars": 4,
"preview": "lib\n"
},
{
"path": "packages/layout/CHANGELOG.md",
"chars": 36887,
"preview": "# @react-pdf/layout\n\n## 4.4.2\n\n### Patch Changes\n\n- [#3254](https://github.com/diegomura/react-pdf/pull/3254) [`cc1aff24"
},
{
"path": "packages/layout/README.md",
"chars": 174,
"preview": "<p align=\"center\">\n <img src=\"https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d0"
},
{
"path": "packages/layout/globals.d.ts",
"chars": 5845,
"preview": "declare module 'yoga-layout/load' {\n export enum Align {\n Auto = 0,\n FlexStart = 1,\n Center = 2,\n FlexEnd ="
},
{
"path": "packages/layout/jest.config.js",
"chars": 77,
"preview": "export default {\n automock: false,\n testRegex: 'tests/.*?(test)\\\\.js$',\n};\n"
},
{
"path": "packages/layout/package.json",
"chars": 978,
"preview": "{\n \"name\": \"@react-pdf/layout\",\n \"version\": \"4.4.2\",\n \"license\": \"MIT\",\n \"description\": \"Resolve document component'"
},
{
"path": "packages/layout/rollup.config.js",
"chars": 606,
"preview": "import typescript from '@rollup/plugin-typescript';\nimport { dts } from 'rollup-plugin-dts';\nimport del from 'rollup-plu"
},
{
"path": "packages/layout/setupTests.js",
"chars": 199,
"preview": "import { vi } from 'vitest';\nimport createFetchMock from 'vitest-fetch-mock';\n\nimport '../../polyfills';\n\nconst fetchMoc"
},
{
"path": "packages/layout/src/canvas/measureCanvas.ts",
"chars": 3234,
"preview": "import { MeasureFunction } from 'yoga-layout/load';\nimport getMargin from '../node/getMargin';\nimport getPadding from '."
},
{
"path": "packages/layout/src/image/fetchImage.ts",
"chars": 949,
"preview": "import resolveImage from '@react-pdf/image';\n\nimport getSource from './getSource';\nimport resolveSource from './resolveS"
},
{
"path": "packages/layout/src/image/getRatio.ts",
"chars": 268,
"preview": "import { SafeImageNode } from '../types';\n\n/**\n * Get image ratio\n *\n * @param node - Image node\n * @returns Image ratio"
},
{
"path": "packages/layout/src/image/getSource.ts",
"chars": 295,
"preview": "import { SafeImageNode } from '../types';\n\n/**\n * Get image source\n *\n * @param node - Image node\n * @returns Image src\n"
},
{
"path": "packages/layout/src/image/measureImage.ts",
"chars": 2219,
"preview": "import * as Yoga from 'yoga-layout/load';\n\nimport getRatio from './getRatio';\nimport getMargin from '../node/getMargin';"
},
{
"path": "packages/layout/src/image/resolveSource.ts",
"chars": 415,
"preview": "import { SourceObject } from '../types';\n\n/**\n * Resolves `src` to `@react-pdf/image` interface.\n *\n * Also it handles f"
}
]
// ... and 631 more files (download for full content)
About this extraction
This page contains the full source code of the diegomura/react-pdf GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 831 files (3.0 MB), approximately 834.2k tokens, and a symbol index with 1021 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.