News Category

Spire.PDF 9.2.2 adds TextCompressionOptions to support setting compression type

2023-02-03 09:50:59

We are happy to announce the release of Spire.PDF 9.2.2. This version adds TextCompressionOptions to support setting compression type and supports setting the color space of PdfSeparationColor as RGB. Besides, it enhances the conversion from PDF to Excel as well as images and XPS to PDF. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-5132 Supports setting the color space of PdfSeparationColor as RGB.
PdfDocument pdf = new PdfDocument();
 PdfPageBase page = pdf.Pages.Add();
 PdfRGBColor c = Color.Purple;

 //color space RGB
 PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.R, c.G, c.B));
 //color space CMYK
 PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.C, c.M, c.Y, c.K));
 //color space Grayscale
 PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.Gray));

 PdfSeparationColor color = new PdfSeparationColor(cs, 1f);
 PdfSolidBrush brush = new PdfSolidBrush(color);
 page.Canvas.DrawPie(brush, 10, 30, 60, 60, 360, 360);
 page.Canvas.DrawString("Tint=1.0", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(22, 100));
 color = new PdfSeparationColor(cs, 0.5f);
 brush = new PdfSolidBrush(color);
 page.Canvas.DrawPie(brush, 80, 30, 60, 60, 360, 360);
 page.Canvas.DrawString("Tint=0.5", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(92, 100));
 color = new PdfSeparationColor(cs, 0.25f);
 brush = new PdfSolidBrush(color);
 page.Canvas.DrawPie(brush, 150, 30, 60, 60, 360, 360);
 page.Canvas.DrawString("Tint=0.25", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(162, 100));
 pdf.SaveToFile("SpotColorrgb.pdf");
New feature SPIREPDF-5705 Adds TextCompressionOptions to support setting compression type.
PdfCompressor compressor = new PdfCompressor(fileName);
compressor.Options.TextCompressionOptions.UnembedFonts = true;
compressor.CompressToFIle(outputName);
Bug SPIREPDF-5386 Optimizes the time consumption when converting PDF to Excel.
Bug SPIREPDF-5511 Fixes the issue that it failed to display the added text annotation in WPS software.
Bug SPIREPDF-5659 Fixes the issue that the time consumption of converting two pages with same content to image differs a lot.
Bug SPIREPDF-5660 Fixes the issue that the invisible lines became visible after converting XPS to PDF.
Bug SPIREPDF-5677 Fixes the issue that caused incorrect format after extracting text from PDF pages.
Bug SPIREPDF-5697 Fixes the issue that getting the Destination of bookmark returned incorrect data.
Bug SPIREPDF-5726 Fixes the issue that the application threw the "ArgumentException" when converting Pdf to image.
Click the link to download Spire.PDF 9.2.2:
More information of Spire.PDF new release or hotfix: