Closed tzieleniewski closed 4 years ago
Can you provide some detail about your use case and why you need this feature? Also would be great if you could point to equivalent features in other barcode generator libraries (e.g. barcode4j). My main worry is that this feature may not be useful to other users, and I want to make sure that we aren't adding too many super-niche features.
Our case seems to be a quite common one. We are generating barcodes (svg elements) within XHTML documents. XHTML as XML document can contain only one XML declaration in the document prolog. It would be a useful feature to be capable to generate barcode without XML declaration.
We are only using OkapiBarcode, we don't have any comparison to alternative libraries.
Can you create a pull request? Please don't change the SymbolRenderer interface, since none of the other implementations care about this parameter. An additional SvgRenderer constructor parameter will do. Please also include a test (see SvgRendererTest).
Note: I assume this is about omitting the entire XML prolog (XML declaration + doctype), correct?
Hi,
I would be gr8 to add a feature to allow to indicate if symbol rendering should include XML declaration at the beginning of the output.
This could be done on the SymbolRenderer API/contract level by the addition of a new method or extension of the existing one with boolean flag parameter for this, i.e.
Alternatively the SvgRenderer class could have a new constructor parameter for the XML declaration flag. Flag field would be analyzed and taken into account during rendering.
Any thoughts? ideas?
All the best TKZ