Hello,
Our customer has issue with PowerPoint to PDF conversion. Conversion itself works correctly, however, when we add stamps, images underneath become blurry.
You can download source, stamp and resulting PDF here: https://drive.google.com/file/d/1RFoIg0b9G6K6hUPCmjjefT0--HPDXHl_/view?usp=sharing
Please let me know if there is something we can do, or you have to release a fix for this.
Tested with version 23.1.0.0 for .Net.
Thank you,
Sergey
Can you please also share the sample code snippet that you are using to stamp the PDF? Please do share sample PDF that you obtained after converting from PPTX to PDF. We will test the scenario in our environment and address it accordingly.
PowerPoint issue.zip (5.9 MB)
I’ve attached what was on that link, including stamp and resulting pdf.
Here’s the code snippet we use:
PdfPageStamp stamp = GetReportStamp();
using (var pdfDoc = new Aspose.Pdf.Document(documentStream))
{
for (var i = page; i <= pdfDoc.Pages.Count; i++)
{
pdfDoc.Pages[i].AddStamp(stamp);
}
var outputStream = new MemoryStream();
pdfDoc.Save(outputStream);
}
If I skip AddStamp() code, resulting pdf looks good.
Thank you,
Sergey
Hello,
Just wondering if you had a chance to review this issue.
Thanks,
Sergey
Thanks for your patience. We are looking into the scenario in our environment. Could you please share which method are your using to generate PDF from PPTX in the first place? Can you please share the generated PDF (obtained after converting from PPTX) for our reference as well? This would help us in investigation.
Hello @asad.ali
I’ve posted a generated pdf with no stamps.
Here’s the code we use to get the document stream:
using (var presEx = new Presentation(fileStream))
{
var pdfOptions = new PdfOptions { SufficientResolution = 48 };
presEx.Save(documentStream, Aspose.Slides.Export.SaveFormat.Pdf, pdfOptions);
}
We then use it to create pdf document to add stamps:
using (var pdfDoc = new Document(documentStream))
{
for (var i = page; i <= pdfDoc.Pages.Count; i++)
{
pdfDoc.Pages[i].AddStamp(landscapeStamp);
}
}
Output without stamps .pptx.pdf (3.1 MB)
Thank you,
Sergey
Please check the attached output PDF that we stamped and generated using Aspose.PDF for .NET 23.1 in our environment. The images quality in it looks fine. Please check it and use 23.1 version. In case you still face any issues, please let us know. result.stamped.pdf (3.2 MB)
@asad.ali
I originally tested with version 23.1 and I’ve re-tested today using this version and got the same result with blurry images.
Could you post the code or the test project you used to create your pdf?
Thank you,
Sergey
@asad.ali
I found the issue. We set SufficientResolution = 48 and looks like it’s not enough in this case.
var pdfOptions = new PdfOptions { SufficientResolution = 48 };
presEx.Save(documentStream, Aspose.Slides.Export.SaveFormat.Pdf, pdfOptions);
If I don’t set SufficientResolution, it works correctly.
This topic can be closed.
Thank you,
Sergey
It is nice to know that you were able to resolve your issue. Please keep using the API and feel free to create a new topic in case you need any kind of assistance.