pdfme / pdfme

A TypeScript based PDF generator library, made with React.
https://pdfme.com
MIT License
2.16k stars 192 forks source link

Added support for color type option in generator #436

Closed necessarylion closed 2 months ago

necessarylion commented 2 months ago
const pdf = await generate({
    ...
    options: {
      ...
      font, 
      // now support CMYK or RGB color type
      // if the value is not set, hex color will be generated into RGB color type
      colorType: 'cmyk'
    },
});

Color type will applied to text, line, rect and ellipse which are the the components that need colors at the moment.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **pdfme-playground** | ⬜️ Ignored ([Inspect](https://vercel.com/labelmake/pdfme-playground/6gxZ6aBL5YzHA2G3DnDmABMecdbw)) | [Visit Preview](https://pdfme-playground-git-fork-necessarylion-main-labelmake.vercel.app) | | Mar 3, 2024 10:18am | | **pdfme-playground-v4** | ⬜️ Ignored ([Inspect](https://vercel.com/labelmake/pdfme-playground-v4/7EgXG7ZScdQUkzjuojpQAz5fayRy)) | [Visit Preview](https://pdfme-playground-v4-git-fork-necessarylion-main-labelmake.vercel.app) | | Mar 3, 2024 10:18am |
hand-dot commented 2 months ago

Hey @necessarylion !!! So cool!

This weekend I will check this.

hand-dot commented 2 months ago

@necessarylion

Released! https://github.com/pdfme/pdfme/releases/tag/3.3.0

Thank you for your contribution 👍