GroupDocs.Annotation v22.4 and later allows you to set the quality of an image added to a document. To do this, specify the imageQuality parameter of the AddImageToDocument method.
The parameter value is from 1 to 100. 1 means the lowest resolution, and 100 means the highest.
The following code snippet shows how to set the image quality:
using(Annotatorannotator=newAnnotator("input.pdf-file"))// specify the path to the input PDF file{stringdataDir="input.pdf";// specify the path to the input PDF filestringdata="image.jpg";// the path to the JPG fileintpageNumber=1;// set the page where the image will be insertedintimageQuality=10;// set image quality from 1 to 100annotator.Document.AddImageToDocument(dataDir,data,pageNumber,imageQuality);}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.