We recently upgraded from Aspose.word 15.1 to 19.8 to resolve an issue with overflowing tables while converting a docx to pdf. Overflowing tables issue got resolved but barcode stopped getting converted from docx to pdf. “Provident Code128 Barcode” is the barcode font. Please suggest if we are missing something or need to change our code to convert barcodes. Rest of the conversion is working fine without changing any code.
Thanks!
@unumgroup
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input Word document.
- Please attach the output PDF file that shows the undesired behavior.
- Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
DocxToPDFUsingAspose.zip (4.9 MB)
Hi Tahir,
I have attached sample console app.
Input Document is in path: DocxToPDFUsingAspose\InputDoc
Output PDF is in path: DocxToPDFUsingAspose\OutputPdf
Since Aspose dlls were large I removed from this zip (I hope you can get it from your repository). I have attached details screenshot of dlls we are using.
Aspose151.PNG (9.2 KB)
Aspose198.PNG (8.7 KB)
Thanks!
Forgot to mention, barcode is in word doc footer, bottom right hand corner of reach page.
Thanks!
@unumgroup
Please make sure that the text of barode in your document has font name “Provident Code128 Barcode”. You have shared protected document. Please ZIP and attach the unprotected document and font “Provident Code128 Barcode” here for further testing. We will investigate the issue and provide you more information on it.
Hi Tahir, I am not sure what you mean by protected document, I don’t see any protection on the document. Please clarify.
Attaching document and font again. Please check.InputDoc.zip (35.7 KB)
@unumgroup
Please open the document in MS Word and right click on the footer to edit it. It does not allow you to edit the footer.
Regarding the barcode issue, the font name of barcode is not set to “Provident Code128 Barcode”. Please set the font of barcode text and then convert document to PDF to get the desired output.
Thanks Tahir for response!
Do you know why Aspose 15.1 is able to convert them without any changes or font setup?
@unumgroup
The old version of Aspose.Words 15.1 does not render the barcode. Please make sure that you are using the correct document in which barcode font is set correctly.
Hi Tahir, Aspose.Words 15.1 does render same barcode perfectly (I had shared example too). We have been using for more than 4 - 5 years now. Please let me know if there is another way to get help on this as this is impacting our business processes now.
@unumgroup
Please download the shared input document from this thread and convert it to PDF to check this issue. We have converted the document to PDF using Aspose.Words 15.1 and have not found the barcode in it. Please check the attached PDF file. 15.1.pdf (107.3 KB)
To ensure a timely and accurate response, please attach the following resources here for testing:
- Your input unprotected Word document.
- Please attach the output PDF files generated by Aspose.Words 15.1 and 19.9.
- Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.
As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.
PS: To attach these resources, please zip and upload them.
OutputPdf_UsingAspose198.pdf (85.4 KB)
OutputPdf_UsingAspose151.pdf (88.4 KB)
Attaching the 2 PDFs, 1 each from from 19.8 and 15.1. I used the shared test application for both tests, just changing the Aspose.words.dll
@unumgroup
Please share this document for further testing. Thanks for your cooperation.
2019092421464759C690.zip (33.9 KB)
Hi Tahir,
We are using attached document as input (it is an example). Same document is being processed fine by v15.1 but not converting barcode with v19.8. We are not doing anything with protected state of document in any case.
Thanks!
@unumgroup
We have investigated this issue again and noticed that ‘Provident Code128 Barcode’ is not installed properly at our end. We have installed the shared font but this font is not recognized by Aspose.Words and MS Word as well. Please make sure that you shared the correct font.
Please check the attached image of MS Word.
Could you please execute the following code example at your end and share if you face any warning while using Aspose.Words 19.9?
Document document = new Document(MyDir + "2019092421464759C690.docx");
document.WarningCallback = new HandleDocumentWarnings();
document.Save(MyDir + "output.pdf");
public class HandleDocumentWarnings : IWarningCallback
{
/// <summary>
/// Our callback only needs to implement the "Warning" method. This method is called whenever there is a
/// potential issue during document procssing. The callback can be set to listen for warnings generated during document
/// load and/or document save.
/// </summary>
public void Warning(WarningInfo info)
{
// We are only interested in fonts being substituted.
if (info.WarningType == WarningType.FontSubstitution)
{
Console.WriteLine(info.WarningType + " :: " + info.Description.ToString());
}
}
}
Hi Tahir, Only warning I received is for diff font.
FontSubstitution :: Font ‘Arial (W1)’ has not been found. Using ‘Arial’ font instead. Reason: alternative name from document.
Thanks!
@unumgroup
After installing the barcode font, MS Word 2016 does not render the barcode in the footer at our end. Could you please share your working environment e.g. operating system, MS Word version, .NET Framework etc. Please open your input document in MS Word, take screenshot of first page, and share it here for our reference.