Internals are calculated in points and bwip-js just maps 1pt to 1px.) At that low This is the intention behind BWIPP's width and height parameters.īwip-js is designed for web usage, with a target display resolution of 72dpi. Modules so the overall image meets the requested width or height, while still keeping the module With high resolution printing, you can add/subtract a dot to adjust the size of individual Or rectangle that defines the symbol's layout grid.įor a barcode to be "in spec", the individual module dimensions must be consistent throughout the For 2D symbols, module width and height are the dimensions of the square Linear barcodes, the module width is the width of the narrowest bar, and all other bar widths areĪ multiple of it. The bwip-js scale options multiply the width, height, and padding.Īn important note about the BWIPP width and height parameters.īarcodes have the concept of module width (and height if a two-dimensional barcode). To convert to pixels, use a factor of 2.835 px/mm The resulting images are rendered at 72 dpi. Note that bwip-js normalizes the BWIPP width and height options to always be in millimeters. To determine what options are available for each barcode type. Takes either a hex RRGGBB or hex CCMMYYKK string value.įor the BWIPP specific options, you will need to consult the Rotates and scales with the image.īackgroundcolor : This is actually a BWIPP option but is better handled by the bwip-js drawing code. Paddingbottom : Sets the height of the padding area, in points, on the bottom of the barcode image. Paddingright : Sets the width of the padding area, in points, on the right side of the barcode image. Paddingleft : Sets the width of the padding area, in points, on the left side of the barcode image. Paddingtop : Sets the height of the padding area, in points, on the top of the barcode image. Paddingheight : Shorthand for setting paddingtop and paddingbottom. Paddingwidth : Shorthand for setting paddingleft and paddingright. Padding : Shorthand for setting paddingtop, paddingleft, paddingright, and paddingbottom.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |