Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Sun Feb 23, 2014 2:07 pm

What formats are available to which the barcode can be saved? I see png is used in the example, Ideally I would like it as an SVG. Is this possible?

champagne_charly
 
Posts: 1
Joined: Sat Feb 22, 2014 8:29 pm

Mon Feb 24, 2014 2:15 am

Hello,

Spire.BarCode supports variable common image formats, such as Bitmap, JPG, PNG, EMF, TIFF, GIF and WMF. As you know, EMF and WMF are SVG format. So you can save barcodes as SVG using our product.
If you have any questions, welcome to get it back to us.

Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Fri Jul 15, 2016 8:00 am

Hi Benjamin,

As the Sprire.Barcode Library uses the native .NET "Image.Save" method, where the EMF and WMF formats are saved incorrectly as PNG formats. How can you pretend that we are able to save the generated barcodes in vector formats using your Spire.BarCode library ? Unless you consider that the EMF/WMF generated format won't be vector graphics...

Thanks,
Florian

fpernisek
 
Posts: 7
Joined: Wed Jun 15, 2016 7:02 am

Fri Jul 15, 2016 9:28 am

Hi,

Thanks for your inquiry.
If you want to save the image as EMF and WMF, please try to use the method Save(string filename, ImageFormat format), and set the ImageFormat.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Jul 18, 2016 9:07 am

Hi Betsy,

Regarding what I said in my previous post, if you use the native Image.Save() method like the following:

ex:
System.Drawing.Image imgCreation;
Spire.Barcode.BarCodeGenerator gen = new Spire.Barcode.BarCodeGenerator(barCodeSpireSettings);
imgCreation = gen.GenerateImage();
imgCreation.Save("test.emf", ImageFormat.Emf)


Then the real image format saved in the test.emf file is PNG format. (same behavior using ImageFormat.Wmf)


Can you please then explain me how to generate vector graphics-based barecodes ?

Thanks in advance
Florian

fpernisek
 
Posts: 7
Joined: Wed Jun 15, 2016 7:02 am

Mon Jul 18, 2016 9:34 am

Dear Florian,

Thanks for your reply.
I have noticed this issue and posted it to our Dev team. Once there is any progress, we will inform you.
Sorry for inconvenience caused by the issue.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.BarCode