Screenshot 2024-11-29 at 7.52.28 AM.jpg (148.1 KB)
The symbol highlighted in screenshot if we are trying to convert to pdf it is getting converted as ‘-’
Screenshot 2024-11-29 at 7.52.28 AM.jpg (148 KB)
Screenshot 2024-11-29 at 7.52.28 AM.jpg (148.1 KB)
The symbol highlighted in screenshot if we are trying to convert to pdf it is getting converted as ‘-’
Screenshot 2024-11-29 at 7.52.28 AM.jpg (148 KB)
Could you please share the problematic and the resultant files? We’ll further investigate this issue at our end.
@atir.tahir Here are attached files
00000153_Version_4-12.pdf (12.6 KB)
Test Wingding Font.docx (14.3 KB)
Here the font of checkbox symbol is Wingdings
Similar issue with the “Tick Symbol” using Wingdings font: https://forum.groupdocs.com/t/tick-symbol-in-wingdings-is-not-getting-converted-properly-in-pdf/15065
@sonamsinha @Ritesh_Ranjan_Nahak
We couldn’t reproduce this issue at our end. Take a look at these . Please make sure that Wingdings font is installed on your machine where you are doing the Conversion. This issue could be due to missing font family.
However, if issue persists after installing the missing font family, please share your development environment details (e.g. Java version), document Conversion code and GroupDocs.Total for Java API version (e.g. 24.9, 24.10).
output PDF files.zip (50.1 KB)
@atir.tahir
PDF producer:Aspose.PDF for Java 24.3
PDF version:1.7
@sonamsinha The problem is not reproducible using the latest version of Aspose.Words and the following simple code:
Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.pdf");
Here is the produced output: out.pdf (31.7 KB)
Most likely the problem occurs because the fonts used in the document are not available in the environment where document is rendered to PDF. If Aspose.Words cannot find the fonts used in the document the fonts are substituted. This might lead into the layout differences due to differences in fonts metrics. You can implement IWarningCallback to get a notification when font substitution is performed.
The following articles can be useful for you:
https://docs.aspose.com/words/java/specify-truetype-fonts-location/
https://docs.aspose.com/words/java/install-truetype-fonts-on-linux/
@alexey.noskov Can you try with Aspose for Java once. The above pdf files you have shared is using Aspose for .NET
@sonamsinha Sure, here is the output produced on my side using the latest 24.12 version of Aspose.Words for Java:
out.pdf (31.7 KB)
@alexey.noskov We are using “Aspose.PDF for Java 24.3”
You have shared for “Aspose.Words for Java 24.12.0”
Can you please try for Aspose.PDF with version 24.3? We are facing issues with this specific version. We are not using Aspose.Words
@sonamsinha Aspose.PDF does not support MS Word to PDF conversion. Could you please provide code that will allow us to reproduce the problem?
long startTime = System.currentTimeMillis();
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
// Below is required for adding Tags in the output PDF documnet
loadOptions.setPreserveDocumentStructure(true);
logger.info("Office document size in bytes: {}", contentInBytes.length);
InputStream is = new ByteArrayInputStream(contentInBytes);
title = isBase64Encoded(title) ? new String(Base64.decodeBase64(title), StandardCharsets.UTF_8) : title;
try (Converter converter = new Converter(() -> is, () -> loadOptions)) {
try (ByteArrayOutputStream ms = new ByteArrayOutputStream()) {
PdfConvertOptions convertOptions = new PdfConvertOptions();
PdfOptions pdfOptions = convertOptions.getPdfOptions();
pdfOptions.getFormattingOptions().setDisplayDocTitle(showDocTitle);
PdfDocumentInfo pdfDocumentInfo = pdfOptions.getDocumentInfo();
pdfDocumentInfo.setTitle(title);
converter.convert(() -> ms, convertOptions);
byte[] outputPdfBytes = ms.toByteArray();
long endTime = System.currentTimeMillis();
logger.info("Generated PDF content size in bytes: {}", outputPdfBytes.length);
logger.info(
"Office document to PDF conversion using GroupDocs completed in {}ms", (endTime - startTime));
return outputPdfBytes;
}
} catch (IOException e) {
System.out.println(e.getMessage());
throw e;
}
We are using “GroupDocs.Total for Java” Product of Enterprise Edition
@sonamsinha I will move your question to GroupDocs support forum. My colleagues will help you shortly.
This topic has been moved to the related forum: Wingsdings Font - issue while converting word to pdf - Free Support Forum - groupdocs.com