Barcodes are not working (rendering blank)

I am using Groupdocs.Assembly for dot net version 25.6.0 on linux, using dot net 8.
SkiaSharp and SkiaSharp.NativeAssets.Linux 3.119.0 are included in the build.
We have recently updated to 25.6 from an older version that errored if using barcodes in dot net 8 on linux due to the system.drawing incompatibility.

Barcodes in the output are blank.
After trying everything I can think of, I tried making a blank word document adding a textbox and putting this in it:
<<barcode [β€œ736192”]-codabar barHeight=β€œ67”>>
and running assemble just to be sure, and it still returns blank in the box, not rendering anything.

Is there a known issue, am I doing something wrong?

@arcd

It seems you’re experiencing issues with barcode rendering in your document using GroupDocs.Assembly on Linux. Given that you are using version 25.6.0 and have included the necessary SkiaSharp libraries, the problem may stem from a missing dependency or configuration issue.

Here are some troubleshooting steps you can take:

  1. Check Dependencies: Ensure that all required native libraries for SkiaSharp are correctly installed on your Linux system. The error logs indicate that libSkiaSharp or its dependencies might not be found. You can install the necessary libraries using your package manager. For example, on Ubuntu, you might need to run:

    sudo apt-get install libfontconfig1
    
  2. Update GroupDocs.Assembly: Since you are using an older version of GroupDocs.Assembly (25.6.0), consider updating to the latest version (25.10.0) if possible, as it may contain fixes for issues related to barcode rendering.

  3. Test with a Simple Barcode: Create a minimal test case with just the barcode in a new document. Use the following syntax:

    <<barcode ["736192"]-codabar barHeight="67">>
    

    Ensure that this is the only content in the document to isolate the issue.

  4. Check for Errors: Review the logs for any additional error messages that might provide more context on what is failing during the rendering process.

  5. Consult Documentation: Refer to the official documentation for GroupDocs.Assembly regarding barcode generation to ensure that you are using the correct syntax and options.

If the issue persists after these steps, consider reaching out to the support forum for further assistance, as there may be specific known issues with the version you are using.

Could you please share the sample code and the problematic output/resulting file? This will help us further investigate the issue.

I’ve tried to make it as simple as possible.
Sample Code:

var entities = new Entities();
var attachment = GetTemplateAttachment(entities, template.TemplateId);
var templateBytes= attachment.Attachment;
bool pdfInputType = attachment.FileName.ToUpper().EndsWith(β€œ.PDF”);
byte[] retBytes = null;
using(var templateStream = new MemoryStream(templateBytes))
{
MemoryStream document = new MemoryStream();
var assembler = new GroupDocs.Assembly.DocumentAssembler();
// assembler.Options = GroupDocs.Assembly.DocumentAssemblyOptions.UpdateFieldsAndFormulas;
// assembler.BarcodeSettings.BaseXDimension = 1;
// assembler.BarcodeSettings.BaseYDimension = 1;
// assembler.BarcodeSettings.GraphicsUnit = Aspose.Drawing.GraphicsUnit.Millimeter;
// assembler.BarcodeSettings.Resolution = 300f;
var test = new Dictionary<string, object> { { β€œtest”, β€œtest” } };
GroupDocs.Assembly.DataSourceInfo[] dsi = new GroupDocs.Assembly.DataSourceInfo[] { new GroupDocs.Assembly.DataSourceInfo(test, β€œRoot”) };
assembler.AssembleDocument(templateStream, document, dsi.ToArray());
document.Position = 0;
retBytes = document.ToArray();
}

Sample template
barcodetest.docx (29.9 KB)

Sample output
output.docx (18.5 KB)

1 Like

@arcd
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): ASSEMBLYNET-60

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.