We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Barcodes with jagged bar edges

We're using Aspose Barcode and Aspose Words in .NET to print documents with code 128 barcodes from a Windows service on Windows Server 2008 SP2. I'm using the Aspose-provided XpsPrintReady class to convert a Word document to an XPS stream and print to Ricoh laser printers, usually the SP 4310N model.

Barcodes on these documents are printing with jagged vertical edges.

By using the Ricoh PCL 6 driver and specifying a resolution of 1200 x 600 dpi in the printer's Print Quality settings (Printing Defaults => Detailed Settings => Print Quality), I've been able to obtain good barcode grades, but the bars still show some degree of jagged vertical edges. If I change to Ricoh's XPS driver, the jagged edges disappear, but that driver has not proved reliable when printing a large volume of documents on a printer in close succession. (Some documents do not print, and sometimes information is missing on the document).

Any suggestions on how to correct the jagged vertical bar edges problem? Maybe this is a question for Ricoh, not sure. Attached is my code, the intermediate .docx file, and a scan of the output document. Thank you.

Hi Geoffrey,


Thanks for your inquiry. In case you are using an older version of Aspose.Words, we would suggest you please upgrade to the latest version (v15.10.0) from here and let us know how it goes on your side.

This issue seems not to be related with Aspose.Words. Please note that Aspose.Words Print method uses System.Drawing and standard .NET printing classes.

Please save your Word document into XPS file format (see the highlighted code below) and print the XPS manually and share your finding. If you still face problem, please share following detail for testing purposes.

  • Please attach your input Word document
  • Please share the output XPS file (using the following highlighted code)
  • Please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code (Aspose.Words code) you used to generate your output document.


public static void Print(Aspose.Words.Document document, string printerName, string jobName, bool isWait)

{

if (document == null)

throw new ArgumentNullException(“document”);

// Use Aspose.Words to convert the document to XPS and store in a memory stream.

MemoryStream stream = new MemoryStream();

document.Save(@“c:\temp\out.xps”, Aspose.Words.SaveFormat.Xps);

document.Save(stream, Aspose.Words.SaveFormat.Xps);

stream.Position = 0;

Print(stream, printerName, jobName, isWait);

}