pdfme / pdfme

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

Support Barcode type PDF417 #435

Open Byevenes opened 2 months ago

Byevenes commented 2 months ago

Is your feature request related to a problem? Please describe.

We need to create a bar code with this format pdf 417

Describe the solution you'd like

in the designer page add new type pdf 417 into the text, qr, signature, etc ...

Describe alternatives you've considered

N/A

Additional context

No response

vpn-dev commented 2 months ago

Hey @Byevenes , Can you explain the specific details of this feature, what you want to acheive? , I believe you want to add a schema for generating barcode in PDF417 format, where you can put text or data thats needs to be encoded into barcode.

peteward commented 1 month ago

pdf417 is supported by bwip-js, the barcode generator that is included in pdfme, so this is easily achievable.

You could test this by forking the repo and adding the type pdf417 to this list:

export const BARCODE_TYPES = [
  'qrcode',
  'japanpost',
  'ean13',
  'ean8',
  'code39',
  'code128',
  'nw7',
  'itf14',
  'upca',
  'upce',
  'gs1datamatrix',
] as const;

Further changes would be required to the barcode schema including the propPanel, but you should be able to work it out if you have some JS experience.

Let us know how you get on. This could either be implemented as a separate plugin, or possibly a PR to extend the existing barcode one if the code changes are smaller.