How to use "byte array" as data to write PDF417 barcode?
How to use "byte array" as data to write PDF417 barcode?
Hi guys,
please, is there any way how to use "byte array" as barcode data?
Both BarcodePDF417Write method overloads expect "string" as data.
I would like to encode raw byte data -> should be possible with PDF 417 (with use of BarcodePDF417EncodingMode.BarcodePDF417EncodingModeByte), correct?
Any idea how to do that without base64 encoding?
Thank you!
Ondrej
please, is there any way how to use "byte array" as barcode data?
Both BarcodePDF417Write method overloads expect "string" as data.
I would like to encode raw byte data -> should be possible with PDF 417 (with use of BarcodePDF417EncodingMode.BarcodePDF417EncodingModeByte), correct?
Any idea how to do that without base64 encoding?
Thank you!
Ondrej
Re: How to use "byte array" as data to write PDF417 barcode?
Hi,
Just pass the byte array as string using the correct encoding:
Kind regards,
Loïc
Just pass the byte array as string using the correct encoding:
Code: Select all
string myString = Encoding.GetEncoding(1252).GetBytes(data);
Loïc
Re: How to use "byte array" as data to write PDF417 barcode?
Hi Loïc,
are you sure it will work?
I mean byte array can contain whatever byte sequence (imagine byte[] from ZIP stream)
I'm afraid that some specific encoding could destroy the data.
What do you think?
Best regards,
Ondrej
are you sure it will work?
I mean byte array can contain whatever byte sequence (imagine byte[] from ZIP stream)
I'm afraid that some specific encoding could destroy the data.
What do you think?
Best regards,
Ondrej
Who is online
Users browsing this forum: No registered users and 1 guest