I'm having trouble printing a Word document that contains a barcode. When I open the document in Word, the barcode displays correctly, but when I print through Aspose, it prints the text (*100* in my example). The barcode prints correctly when I print through Word instead of through code.
Here is the code I use to print (PrintJob is a class I have that holds the printer name, number of copies and some other details my application uses).
Dim wordDocument As Document
wordDocument = New Document(MergedFileName)
Dim printerSettings As New System.Drawing.Printing.PrinterSettings()
printerSettings.Copies = Convert.ToInt32(PrintJob.Copies)
printerSettings.PrinterName = PrintJob.Printer
printerSettings.PrintToFile = False
wordDocument.Print(printerSettings, MergedFileName)
My code also saves the document as a PDF, and there the barcode displays correctly! Here is the code I'm using to save the document as a PDF.
Dim pdfoption As PdfSaveOptions = New PdfSaveOptions()
pdfoption.CustomPropertiesExport = PdfCustomPropertiesExport.Standard
pdfoption.Compliance = PdfCompliance.Pdf15
wordDocument = New Document(MergedFileName)
wordDocument.Save(fullPDFFileName, pdfoption)
I've attached the files I'm working with, including the barcode font. I have Aspose.Words v14.6.0.0 installed.
My application runs as a service, and in my testing I'm running the service as my account which is a local admin.