Need a high quality(with more dpi) pdf document

Hi,


We have a need to convert a pptx document into pdf with high quality. I have used the code mentioned below to convert pptx to pdf. However the pdf created does not have a high quality even after setting the JpegQuality to 100. Kindly find attached the pdf generated using aspose.slides. I have also attached another pdf (PowerPoint(We require this type of quality).pdf) that will give you an idea about the quality that we require.

public String convertPPT2PDF(String pptxFilePath){
String fileName = ChartServiceUtil.getFileName(pptxFilePath);
PresentationEx pres = new PresentationEx(pptxFilePath);

//Instantiate the PdfOptions class
com.aspose.slides.PdfOptions opts = new com.aspose.slides.PdfOptions();

//Set Jpeg Quality
opts.setJpegQuality((byte) 100);
opts.setSufficientResolution(600f);

//Define behavior for metafiles
opts.setSaveMetafilesAsPng(true);

//Set Text Compression level
opts.setTextCompression(com.aspose.slides.PdfTextCompression.Flate);

//Define the PDF standard
opts.setCompliance(com.aspose.slides. PdfCompliance.Pdf15);
String pdfFilePath = ECMUtils.OUTPUT_PDF_PATH+fileName+"."+CSConstants.PDF;
//Save the prsentation to PDF with specified options
System.out.println(“Saving PDF at :”+pdfFilePath);
pres.save(pdfFilePath, com.aspose.slides. SaveFormat.Pdf,opts);
System.out.println(“Saved PDF File …”);
return pdfFilePath;
}
Kindly let us know if we can use any settings to get a better quality in the generated PDF using Aspose.Slides.

Thanks,
Gaurang.

Hi Gaurang,

I have observed the inquiry shared by you and have also observed the desired PDF file shared by you. The desired PDF file that you have shared has also been created using Aspose.Slides for Java 8.4.0 as the watermark is visible in background. Can you please kindly share that what further improvement is needed in this regard by using Aspose.Slides for Java. I also like to add that you can further improve the quality by setting opts.setSufficientResolution(). But please remember, the higher value you set for Sufficient Resolution, the greater will be the size of resultant PDF.

Many Thanks,

Hi Mudassir,


Thank you for your quick reply. The PDF file was created using ADTS server using documentum. The watermark on the PDF is not because of the PPTX to PDF conversion, actually the chart values in the pptx file were modified using trial version of Aspose.Slides prior to PDF creation using the ADTS server hence the watermark in the background. The pdf file present in the zip file PowerpointToPDF.zip, is the pdf that was created using Aspose. I tried using the opts.setSufficientResolution(300f), but the size of the pdf did not change neither did the quality of the pdf improve.

Also I have observed that the chart bars etc is very crisp which is good. But is there any way to improve the dpi of the Text in the chart? You can see the difference when you zoom and compare the text in the pdf documents the were attached. You can see the pixels in the aspose created pdf. But the other pdf does not show pixels even at high zoom levels.

Thanks,
Gaurang.

Hi Gaurang,


Thanks for your explanation about the generated PDF files. I have tried using the shared sample code on my end and have observed two issues. The setSufficientResolution() method does not seem to set the values used for rendering PDF. As a result of this the quality of generated PDF is not improving. However, when I use Aspose.Slides for .NET the SufficentResolution property is working fine. For your kind reference, I have attached the Aspose.Slides for .NET generated PDF in this regard as well. An issue with ID SLIDESJAVA-34328 has been created in our issue tracking system to investigate and resolve the issue.

I have also observed that the InvertIfNegative values for series data are getting rendered with colors as well in PDF. An issue with ID SLIDESJAVA-34329 has been created in our issue tracking system to investigate and resolve the issue on our end.

This thread has been linked with the issues so that you may be automatically notified once the issues will be resolved.

We are sorry for your inconvenience,

Hi Mudassir,


Thank you for the attachment. I saw the resolution of the PDF created in .NET. And I can definitely say that it is a having a great quality. We would need similar quality in the Aspose.Slides for java as early as possible. Kindly let us know once this is fixed. Also can you kindly let us know the value that was set in the SufficientResolution property for our reference?

Thanks,
Gaurang.

Hi Gaurang,

I will for sure inform you as soon as the support will be available for setting sufficient resolution in Aspose.Slides for Java. I used the value 96 on my end. You can set the value as per your requirement. The 96 is default value that is set.

Many Thanks,

Hi Mudassir,


Thank you for your reply. Since we have an urgent requirement for this fix, what would be the earliest month/date you could fix this?
Also due to our urgency I humbly request you to take this on a very high priority.

Thanks,
Gaurang.

Hi Gaurang,


I like to share that the issue is under investigation and has been logged under the high priority as against the normal priority level in our issue tracking system. We will share the good news with you as soon as the issue will be resolved.

Many Thanks,

Hi Mudassir,


Kindly let us know when we can get the fix for this issue. We are in an urgent need for the fix.

Thanks,
Gaurang.

Hi Gaurang,

I have verified from our issue tracking system and like to share that the issues shared have been created recently are still pending for investigation in our issue tracking system. Our development team will schedule the issues on their due turn in first come and first serve basis. Once investigation will be completed, I will be able to share the feedback with you as soon as it will be shared by our development team. I will really appreciate your patience in this regard.

Many Thanks,

Hi Mudassir,

Can you update me on the ETA for the fix. Also in one of the posts you had mentioned that you write the code in .NET and JAR's for JAVA are automatically created using the same .NET code. So why is the high quality functionality working only for .NET and not JAVA.

Kindly provide an ETA for this and kindly raise the priority for fixing this defect.

Thanks,

Gaurang.

Hi Gaurang,

I have verified both issues using Aspose.Slides for Java 14.6.0 with attached code on my end. I have been able to find the issues SLIDESJAVA-34328 as resolved. The generated PDF has good quality as compared to one generated using earlier version.

public static void convertPPT2PDF(String pptxFilePath,String fileName){
// String fileName = pptxFilePath;
Presentation pres = new Presentation(pptxFilePath+fileName);

//Instantiate the PdfOptions class
com.aspose.slides.PdfOptions opts = new com.aspose.slides.PdfOptions();

//Set Jpeg Quality
opts.setJpegQuality((byte) 100);

opts.setSufficientResolution(600f);

//Define behavior for metafiles
opts.setSaveMetafilesAsPng(true);

//Set Text Compression level
opts.setTextCompression(com.aspose.slides.PdfTextCompression.Flate);

//Define the PDF standard
opts.setCompliance(com.aspose.slides. PdfCompliance.Pdf15);

//Save the prsentation to PDF with specified options
pres.save(pptxFilePath+fileName+".pdf", com.aspose.slides. SaveFormat.Pdf,opts);
System.out.println(“Saved PDF File …”);

}

For issue SLIDESJAVA-34329, I regret to share that it is still unresolved. I have discussed the issue with our development team and have requested them to schedule this for investigation and resolution as well. I will share the further updates with you as soon as they will be shared by our development team.

Many Thanks,

Hi Mudassir,

Thank you for your quick reply. But, I have used the above code in my method convertPPT2PDF with different values as follows for the jar version 14.6.0:

serv.convertPPT2PDF(pptFileName, 1, 90);
serv.convertPPT2PDF(pptFileName, 1, 300);
serv.convertPPT2PDF(pptFileName, 1, 600);
serv.convertPPT2PDF(pptFileName, 50,90);
serv.convertPPT2PDF(pptFileName, 50,300);
serv.convertPPT2PDF(pptFileName, 50,600);
serv.convertPPT2PDF(pptFileName, 100,90);
serv.convertPPT2PDF(pptFileName, 100,300);
serv.convertPPT2PDF(pptFileName, 100,600);

where, 1,50 and 100 is the quality and 90,300 and 600 is the dpi. I have noticed that the size of the pdf for all of the above cases remains the same and there is no noticeable difference in the quality/dpi of the chart/text in the pdf created. Also, i noticed that the size of the pdf created with the same pptx file using the earlier version 8.6.0 was 16kb and the size of pdf suing the jar 14.6.0 is 31kb.

Also, I did not find the PresentationEx class in the jar 14.6.0 which was used to load 2007 presentation (pptx). So I used the Presentation class. It did load the pptx presentation correctly, but there is no dispose()method to clean the memory used to load the presentation. Kindly suggest a way to dispose the presentation object created.

Thanks,

Gaurang.

Hi Gaurang,

Thank for sharing the analysis and comparison of Aspose.Slides for Java 8.6.0 and Aspose.Slides for Java 14.6.0. I request you to please share the output PDF files of specified parameters with us so that I may add ticket for them in our issue tracking system.

Secondly, Aspose.Slides for Java 14.6.0 is new unified API that provides the single interface for both PPT and PPTX presentation formats. So there is no PresentationEx class in new API. Infact in new API the base model of Aspose.Slides.Pptx has been used. Like SlideEx has been replaced with ISlide, TextFrameEx with ITextFrame. Similarly, rest of all classes of PPTX namespace have been renamed in the manner shared. I hope this will be helpful.

Many Thanks,

The issues you have found earlier (filed as SLIDESJAVA-34329) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as SLIDESJAVA-34328) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.