Browse our Products

Aspose.PDF for .NET 9.4.0

We are pleased to share a new version of Aspose.PDF for .NET with following improvements.

New Features

PDFNEWNET-36882 PDF to HTML - Extract fonts independentlyPDFNEWNET-36883 PDF to HTML - Extract fonts only once for each page

Enhancements

PDFNEWNET-34396 Problem while using Aspose.PDF for .NET via COM Interop in C++PDFNEWNET-35870 SVG to PDF conversion: Online image resource support.

PDFNEWNET-36009 PDF to HTML conversion: To specify image format for image export

PDFNEWNET-36228 Show note on clicking or onmouseover of Image in PDF

PDFNEWNET-36333 PDF to DOC - Contents appear as image in resultant file

PDFNEWNET-36912 ColumnAdjustment property is missing in Aspose.PDF.Table class

PDFNEWNET-36916 Setting column width as per column contents

PDFNEWNET-37003 PDF to Excel - Export all pages to single sheet

PDFNEWNET-37049 Add Default value to PageLayout enumeration

PDFNEWNET-37071 Ends of InkAnnotation cannot be rounded

Exceptions

PDFNEWNET-33545 Unable to convert XPS document to PDFPDFNEWNET-33658 Unable to load XPS document

PDFNEWNET-33877 XPS to PDF conversion - Exception

PDFNEWNET-33884 Convert XPS to PDF - Exception found

PDFNEWNET-34144 StackOverflowException after calling Optimize() and Save() on a PDF

PDFNEWNET-35046 XPS to PDF - Exception during conversion process

PDFNEWNET-36294 HTMl to PDF - ArgumentNullException during conversion

PDFNEWNET-36648 DivideByZero Execption when printing the document

PDFNEWNET-36743 PDF to XPS throwing EndofStreamException

PDFNEWNET-36982 Concatenation(New Generator) throws NullReferenceException

PDFNEWNET-37019 Exception when adding TOC to PDF where it spans multiple pages

PDFNEWNET-37069 Saving document results in NullReferenceException

PDFNEWNET-37077 IndexOutOfRangeException when merging a DataTable into PDF form

PDFNEWNET-37101 Exception while trying to set inherit zoom for Bookmark

PDFNEWNET-37117 NullReferenceException when setting font size and font style for table row

Bugs

PDFNEWNET-30613 HTML tags with CSS are not rendered properlyPDFNEWNET-31019 Formatting issue during PDF to DOC conversion

PDFNEWNET-31666 PDF to DOC conversion is not correct

PDFNEWNET-32579 when PDF is converted to XPS, the underline formatting is missed

PDFNEWNET-32642 PDF2XPS Conversion Issue

PDFNEWNET-33194 PDF to DOC conversion problem

PDFNEWNET-33333 HTML to PDF conversion problem

PDFNEWNET-33565 PDF to XPS coversion issue

PDFNEWNET-33577 HTML to PDF conversion problem

PDFNEWNET-33757 Convert PDF to Doc: spaces inserted randomly

PDFNEWNET-33838 PDF to XPS conversion issue

PDFNEWNET-34128 XPS to PDF Line Path Curve Error

PDFNEWNET-34415 Create Rectangle directly on PDF canvas (not as annotation) with PDF operators.

PDFNEWNET-34564 Images are not shown (due to transperancy) in XPS to PDF conversion

PDFNEWNET-34574 PDF to HTML Conversion Alignment issue in the generated HTML file

PDFNEWNET-35009 PDF to BMP:- Resultant BMP is not correct

PDFNEWNET-35010 PDF to DOC - Formatting issues in resultant files

PDFNEWNET-35025 Formatting issue upon converting Pdf document to Doc

PDFNEWNET-35239 Changing the Text ForegroundColor, removes page contents.

PDFNEWNET-35614 Background image behind SVG object is not appearing in PDF

PDFNEWNET-35730 SVG to PDF - contents are not properly appearing in resultant PDF

PDFNEWNET-35738 SVG to PDF - Contents are overlapping in resultant file

PDFNEWNET-35840 PDF to XPS: Conversion is changing invoice total

PDFNEWNET-35954 Special Character Getting Truncated while HTML to PDF Conversion

PDFNEWNET-36032 Text formatting is not working when using IsHtmlTagSupported property

PDFNEWNET-36098 TextFragment showing wrong rectangle values

PDFNEWNET-36167 HTML to PDF - Line Height is not working properly

PDFNEWNET-36291 HTML to PDF - Table contents formatting issues in resultant file

PDFNEWNET-36292 PageInfo.IsLandscape is not working

PDFNEWNET-36355 PDF to JPEG - Color problem in resultant image

PDFNEWNET-36379 Not able to convert a PDF to PDF/A

PDFNEWNET-36406 Color are missing / incorrect when converting PDF to JPEG

PDFNEWNET-36497 HTML to PDF - External resources images/css/fonts are not being honored

PDFNEWNET-36544 PDF to PNG - Incorrect colors in resultant image

PDFNEWNET-36548 Regular expression pattern text search is not working

PDFNEWNET-36563 PDF to XPS - Missing background in XPS

PDFNEWNET-36577 PDF to TIFF - Conversion is not correct

PDFNEWNET-36698 Center Alignment issue

PDFNEWNET-36719 Aps to PDF conversion problem: parts of linear charts are absent

PDFNEWNET-36720 Aps to PDF conversion problem : picture created from collection of Path-objects shifted or scaled in incorrect way

PDFNEWNET-36733 TextFragmentAbsorber returns incorrect text occurrence

PDFNEWNET-36815 Accented Characters are not proeprly appearing in PDF File

PDFNEWNET-36844 PDF to XLS - Extra column appearing in resultant file

PDFNEWNET-36864 HTML to PDF - Formatting issues in resultant PDF

PDFNEWNET-36879 Text extracted using TextAbsorber is messed

PDFNEWNET-36898 Adding image in Header/Footer of PDF document

PDFNEWNET-36906 PDF to HTML conversion processing time

PDFNEWNET-36909 ColumnAdjustmentType.AutoFitToContent property is not working properly

PDFNEWNET-36922 Adding table in header and page simultaneously loses page foramatting

PDFNEWNET-36945 HTML to PDF: Columns alignment issue

PDFNEWNET-36948 PDF to XLS: A blank XLS file is being rendered

PDFNEWNET-36958 Encrypting Document using AES256 takes unusually long

PDFNEWNET-37020 CGM to PDF - Unable to set page dimensions during conversion

PDFNEWNET-37046 Unable to find Helvetica Neue LT font when using FreeTextAnnotation

PDFNEWNET-37047 FreeTextAnnotation: Text is being wrapped incorrectly

PDFNEWNET-37053 File is not readable after converting to PDF format 1.3.

PDFNEWNET-37061 Aps to PDF conversion problem : text not clipped as it should

PDFNEWNET-37064 Unable to set inherit zoom for Link created by aspose

PDFNEWNET-37091 PDF to PNG: Width parameter is not being honored

PDFNEWNET-37092 PDF to JPEG - The square annotations are not filled in resultant Image

PDFNEWNET-37093 FreeTextAnnotation: setting background color does not work, it remains transparent

PDFNEWNET-37111 FreeTextAnnotation.Color doues not work correctly for transparent color.

Public API and Backwards Incompatible Changes

Breaking change - PdfPageEditor.Pages property was renamed to ProcessPages

Following code snippet shows the property usage (sets zoom coefficient for page #1 of the document):

 PdfPageEditor editor = new PdfPageEditor();

editor.BindPdf(TestSettings.GetInputFile("input.pdf"));

editor.Zoom = 0.5f;

editor.ProcessPages = new int[] { 1 };

string outFile = TestSettings.GetOutputFile("output.pdf");

editor.Save(outFile);

Breaking change - RichTextBoxField.RValue property was renamed to RichTextValue Following code snippet shows a sample where the renamed field was used:

Document doc = new Document(“input.pdf”);RichTextBoxField rt =

new RichTextBoxField(doc.Pages1, new Rectangle(50, 600, 250, 650));rt.PartialName =

“rt”;doc.Form.Add(rt);doc.Save(TestSettings.GetOutputFile(

“34834.pdf”));Document doc1 =

new Document(TestSettings.GetOutputFile(“34834.pdf”));(doc1.Form[

“rt”] as RichTextBoxField).RichTextValue = “

This is my paragraph

";doc1.Save(

“output.pdf”);

InsertBlankColumnAtFirst option was added into ExcelSaveOptions.Following code snippet shows how to suppress appearing of first blank column:Document doc = new Document(inFile);ExcelSaveOptions options = new ExcelSaveOptions();options.InsertBlankColumnAtFirst = false;doc.Save(outFile, options);PageInfo propertty was added to SvgLoadOptions class.Following code snippet shows how to use SvgLoadOptions and set margin info with PageInfo property:SvgLoadOptions options = new SvgLoadOptions();options.ConversionEngine = SvgLoadOptions.ConversionEngines.NewEngine;options.PageInfo.Margin.Top = 0;options.PageInfo.Margin.Left = 0;options.PageInfo.Margin.Bottom = 0;options.PageInfo.Margin.Right = 0;string inFile = @“F:\ExternalTestsData\35730.svg”;string outFile = @“F:\ExternalTestsData\35730.pdf”;Document pdfDocument = new Document(inFile, options);pdfDocument.Save(outFile) ConversionEngines enumeration was added to SvgLoadOptions class.

Following values are defined:

LegacyEngine

  • legacy engine of Svg processing

NewEngine

  • new Svg processing engine

ConversionEngine

property was added to SvgLoadOptions

classThe LegacyEngine is still default value because NewEngine is in B-testing stages.

Following code snippet shows sample how to use new engine:

SvgLoadOptions options = new SvgLoadOptions();options.ConversionEngine = SvgLoadOptions.ConversionEngines.NewEngine;string inFile = @

“F:\ExternalTestsData\36516_2_income.svg”;string outFile = @

“F:\ExternalTestsData\36516_2_income.pdf”;Document pdfDocument =

new Document(inFile, options);pdfDocument.Save(outFile);

ColumnAdjustment property was added to Table class

ColumnAdjustment

enumeration was adde into Aspose.PDF namespacefollowing values were added:

Customized

  • The user sets the ColumnWidth manually.

AutoFitToContent

  • Performs auto fit to content

ColumnAdjustment

property was added to Table

classThe Default value is Customized

Following code snippet shows sample of the ColumnAdjustment peoperty usage:

 Table hTable = new Table();

hTable.Margin.Top = 4;

hTable.DefaultCellBorder = new BorderInfo(BorderSide.All, 0.5F, Color.Black);

hTable.DefaultCellPadding = new MarginInfo(1, 1, 1, 1);

hTable.Alignment = HorizontalAlignment.Left;

hTable.ColumnAdjustment = ColumnAdjustment.AutoFitToContent;

MinimizeTheNumberOfWorksheets property was introduced into ExcelSaveOptions object.

Following code snippet shows how to minimize possible number of worksheets:Document doc = new Document(“Original.pdf”);ExcelSaveOptions options = new ExcelSaveOptions();

options.MinimizeTheNumberOfWorksheets = true;doc.Save(

“output.xls”, options);Default value was added to PageLayout enumeration.

Following code snippet sets PageLayout to Default value:Document doc1 = new Document(TestSettings.GetOutputFile(“input.pdf”));

doc1.PageLayout = PageLayout.Default;doc1.Save(TestSettings.GetOutputFile(

“output.pdf”));

Rounded Ends support was implemented for InkAnnotation

CapStyle

enumaration was added into Aspose.PDF.InteractiveFeatures.Annotations namespacefollowing values are present”

Rectangular

  • Default specified value

Rounded

  • rounded cornersCapStyle

property was added to InkAnnotation class

Following code snippet shows how to set the InkAnnotation corners as rounded: Document doc = new Document(“PdfWithText.pdf”);Page pdfPage = doc.Pages1;

System.Drawing.Rectangle drect = new System.Drawing.Rectangle();drect.Height = (

int)pdfPage.Rect.Height;drect.Width = (

int)pdfPage.Rect.Width;drect.X = 0;drect.Y = 0;Aspose.PDF.Rectangle arect = Aspose.PDF.Rectangle.FromRect(drect);ArrayList inkList =

new ArrayList();Aspose.PDF.Point[] arrpt =

new Aspose.PDF.Point3;inkList.Add(arrpt);arrpt0 =

new Point(100, 800);arrpt1 =

new Point(200, 800);arrpt2 =

new Point(200, 700);InkAnnotation ia =

new InkAnnotation(pdfPage, arect, inkList);ia.Title =

“XXX”;ia.Color = Aspose.PDF.Color.LightBlue;ia.CapStyle = CapStyle.Rounded;Border border =

new Border(ia);border.Width = 25;ia.Opacity = 0.5;pdfPage.Annotations.Add(ia);doc.Save(

“37071.pdf”);