When converting a PDF to PPTX, bold text in the PDF becomes extra bold in the PPTX. This issue also exists in the DOC export as reported in DOCX bold issue.
Code:
var fileName = "HRA";
try (Document document = new Document("src/main/java/" + fileName + ".pdf")) {
document.save("saved.pptx", SaveFormat.Pptx);
}
After playing around with the document, I noticed it is because the font used is Bold.
Then when the conversion happened, the text was bold again in PPTX, so like you said, it is bold twice.
All I can think of is to use Aspose.Slides to change the font to one that is not bold. Following a similar pattern to the one, I suggested in your other post.
But how to achieve that working on a PPTX will have to be asked in the Aspose.Slides forum, as I do not have the technical knowledge to help you with that.
We’re are adding the footer to the Excel sheet before converting to PDF with the following code. Is there something in the code causing this? Is this why the PDF has bold fonts
String date = "March 14, 2023";
pageSetup.setFooter(0, "&\"Arial\"&8&K02-074&K444444&B" + date + "&B");
Sample code:
String location = ""; // Give xlsx location
Workbook book = new Workbook(location);
var pageSetup = book.getWorksheets().get(0).getPageSetup();
var date = "Sep 27, 2022";
pageSetup.setFooter(0, "&\"Arial\"&8&K02-074&K444444&B" + date + "&B");
// save EXCEL as PDF
book.save("pdfOutput.pdf", com.aspose.cells.SaveFormat.AUTO);
// load the PDF file using Document class
try (Document document = new Document("pdfOutput.pdf")) {
// save document in DOC format
document.save("output.pptx", com.aspose.pdf.SaveFormat.Pptx);
}
The PDF generated is attached. The “Sep 27, 2022” date in footer is converted from the setFotter function call earlier in Excel PageSetup. This PDF is converted to DOCX which contains the double bold issue.
I will create a ticket. But I already told you how to fix this issue in the other post manually. That way, you do not have to wait for a response from the dev team.
@srijal
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): PDFNET-53939
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.
The issues in the free support model have normal priority and are resolved on a first come first serve basis. The resolution time depends upon the number of issues logged prior to it as well as its nature and complexity. Your concerns have been recorded under the ticket and we will surely consider them during ticket investigation. You will be notified as soon as we make some progress towards ticket fix. Please spare us some time.