XRendering SaveQuality Property. The output file quality for lossy compression. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Value Read Only Description
[C#] int

[Visual Basic]
Integer
  75 No The output file quality for lossy compression.

 

   

Notes
 

This property determines the quality of the output image.

It can take values between 0 and 100 ranging from lowest to highest quality.

This property is used for JPEG and JPEG 2000 output only.

 

   

Example
 

The following example shows the effect that this parameter has on PDF rendering.

[C#]
Doc theDoc = new Doc();
theDoc.Read(Server.MapPath("../mypics/SpaceShuttlePage6.pdf"));
theDoc.Rendering.DotsPerInch = 36;
// Save at low quality
theDoc.Rendering.SaveQuality = 5;
theDoc.Rendering.Save(Server.MapPath("RenderingQuality5.jpg"));
// Save at high quality
theDoc.Rendering.SaveQuality = 75;
theDoc.Rendering.Save(Server.MapPath("RenderingQuality75.jpg"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Read(Server.MapPath("../mypics/SpaceShuttlePage6.pdf"))
theDoc.Rendering.DotsPerInch = 36
' Save at low quality
theDoc.Rendering.SaveQuality = 5
theDoc.Rendering.Save(Server.MapPath("RenderingQuality5.jpg"))
' Save at high quality
theDoc.Rendering.SaveQuality = 75
theDoc.Rendering.Save(Server.MapPath("RenderingQuality75.jpg"))
theDoc.Clear()


RenderingQuality5.jpg [file size 9.26 KB]


RenderingQuality5.jpg [file size 37.3 KB]