We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

No support for bar code fields

Thread ID:

Created:

Updated:

Platform:

Replies:

151102 Jan 30,2020 10:12 PM UTC Feb 3,2020 02:15 PM UTC ASP.NET Core - EJ 2 1
loading
Tags: DocIO
Rick Stephens
Asked On January 30, 2020 10:12 PM UTC



Using the following code and the attached word document, we are not getting bar codes to render in the output file.
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("xxxx");
using (var stream = new FileStream(infile, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
using (var wordDocument = new WordDocument(stream, infile.EndsWith("x", StringComparison.CurrentCultureIgnoreCase)
? FormatType.Docx
: FormatType.Doc))
{
using (var converter = new DocIORenderer())
{
converter.Settings.ChartRenderingOptions.ImageFormat = ExportImageFormat.Jpeg;
converter.Settings.EmbedFonts = true;
converter.Settings.PreserveFormFields = true;
converter.Settings.PdfConformanceLevel = Syncfusion.Pdf.PdfConformanceLevel.Pdf_A2B;
var pdfDocument = converter.ConvertToPDF(wordDocument);
using (var outStream = new FileStream(outfile, FileMode.Create))
{
pdfDocument.Save(outStream);
outStream.Flush(true);
outStream.Close();
pdfDocument.Close(true);
}
}
}
}
Is there planned support for this?

Attachment: barcodedoc_9f509d60.zip

Vijayasurya Anandhan [Syncfusion]
Replied On February 3, 2020 02:15 PM UTC

Hi Rick,

Thank you for contacting Syncfusion support.

At present, our Essential DocIO library doesn’t support DisplayBarcode field. On further checking with the DisplayBarcode field, it
 is an older file format feature and also, we don’t have any plans to implement this feature. 

From the given details, we have found that your end requirement is to preserve the Barcode in Word to PDF conversion. As a workaround, we have prepared a sample to meet your requirement which can be downloaded from the following link.
https://www.syncfusion.com/downloads/support/forum/151102/ze/BarcodeImage761657092.zip

In this sample we have done the following things:
1. Loaded the Word document.
2. Iterate all the fields and gets the field
with "DISPLAYBARCODE" field code.
3. Generated barcode image using the barcode value using our Essential PDF library.
4. Removed the field and replaced it with the generated barcode image.
5. Saved the generated PDF.   


Please let us know if you have any questions.

Regards,
Vijayasurya A 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon