We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PDF Document

Hi guys, hoping for a little direction here ...
[code]
//Load an existing document.
PdfLoadedDocument ldoc = new PdfLoadedDocument("input.pdf");
//Initialize new instance of PdfCompressionOptions class.
PdfCompressionOptions options = new PdfCompressionOptions();
//set the compress images based on the image quality. 
options.CompressImages = true;
//set the image quality.
options.ImageQuality = 50;
//set the optimize font.
options.OptimizeFont = true;
//set the optimize page contents.
options.OptimizePageContents = true;
//set the remove metadata informations.
options.RemoveMetadata = true;
ldoc.CompressionOptions = options;
//Save and close the document.
ldoc.Save("Output.pdf");
ldoc.Close(true);
[end code]
looking at the above code, how can I implement the SaveProgress event handler ? (ie like would be implemented forPdfDocument().

MTIA

DWE

3 Replies

KC Karthikeyan Chandrasekar Syncfusion Team December 16, 2018 10:02 PM

Hi Darrin, 
Thank you for your interest in Syncfusion products. 
You can get the sample for using SaveProgress in PdfDocument from the below link. 

Regards, 
Karthikeyan  



DE Darrin Edwards December 16, 2018 10:07 PM

Hi KarthikeyanC 
I am aware of that example, but my question was  how do I integrate that with the sample code I provided - ie how can I use the SaveProgress event with a PDFLoadedDocument? Or is that not possible ?



KC Karthikeyan Chandrasekar Syncfusion Team December 16, 2018 10:16 PM

Hi Darrin, 
Yes, at present we do support for SaveProgress event only in PdfDocument i.e., newly created document and don’t have support in PdfLoadedDocument i.e., existing document. We have logged a feature request and will implement this feature in any of our upcoming releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We request you to visit our website periodically for feature related updates.  

Regards, 
Karthikeyan  


Loader.
Live Chat Icon For mobile
Up arrow icon