New Release 1.6.0.0 and Its Hot Fixes


#1

Dear customers,

Aspose.Pdf 1.6.0.0 is Released on April 3 2004!

Please download the installer or check its more details.

The new release includes all the features provided in Hot Fix 1.5.* and the following is newly added:

1. API simplification. Please view thread API simplification in release 1.6.0 for detail.

2. Database integration supported.
New methods ImportArray and ImportDataTable are added to Table class. Please refer to the API documentation and featured demo for more info.

3. All examples and featured demo are updated according to the simplified API.



#2

Dear customers,

Thanks for your consideration.

In this fix:

1. Empty document and empty section are supported. Please view thread new to aspose.pdf for detail.

2. Bug about document open action(DestinationType) is fixed.

Please download hot fix here.


#3

Dear customers,

Thanks for your consideration.

In this fix a new method SetLicense is added to Pdf class. The Pdf constructor with license as parameter is now obsolete. Please use SetLicense method instead.

Please download hot fix here.


#4

Dear customers,

Thanks for your consideration.

Page breaking is now supported. “#$NP” in a string is used to force page breaking.

Please download hot fix here.


#5

Dear customers,

Thanks for your consideration.

In this fix:

1) A new property IsDisabled is added into Section class. This new property is used to gets or sets a bool value that indicates whether this section is disabled. The default value is false. If this property is set to true, this section will not be rendered. Please view thread pdf question for detail.

2) Setting default cell text info in xml is supported now, which is requested in thread style. A series of attributes which is used to set text info is added into Table element, such as FontName,FontSize,etc. Please view the updated Aspose.Pdf.xsd for detail.

Please download hot fix here.


#6

Dear customers,

Thanks for your consideration.

In this fix, formatting table in API is simplified. Please view thread How to format table? about customer requirement.

1) A new property DefaultCellTextInfo is added to Row class. This property is used to set text format info for all cells in this row. If you want to set text format for all cells that have already been added to the row, please do not set it directly but follow the example below.

2) A new method SetColumnTextInfo is added to Table class. This method is used to set text format info for all cells in the column.

3) A new property IsBuffered is added to Pdf class. This property indicates whether memory buffer is used when generating PDF document. The default value is true. If this property is set to false, Aspose.Pdf will write document directly to PDF file and the GetBuffer method can’t be used.

4) Two new methods GetMinColumnWidth and SetColumnWidth are added to Table class. These tow methods are used to adjust column width after the table has been created.

Here is an example about how to format table. In the example, we import array into a table, set the background color of the first row and right align text in the last column.

[C#]
Pdf pdf1 = new Pdf();
Section sec1 = pdf1.Sections.Add();

Table tab1 = new Table();
sec1.Paragraphs.Add(tab1);
tab1.ColumnWidths = “60 100 100”;

TextInfo tinfo = new TextInfo();
tinfo.FontName = “Courier”;

tab1.DefaultCellBorder = new BorderInfo((int)BorderSide.All,0.1F);
tab1.DefaultCellTextInfo = tinfo;

double[] darr = new Double[]{1.5,3.1415926,100000,20,4000,30.4512,45.67,890,23.45};
tab1.ImportArray(darr,0,0,false);

//set background color for the first row
TextInfo tinfo1 = tinfo.Clone() as TextInfo;
tinfo1.BackgroundColor = new Color("#0000ff");
tab1.Rows[0].DefaultCellTextInfo = tinfo1;

//right align text in the last column
TextInfo tinfo2 = tinfo.Clone() as TextInfo;
tinfo2.Alignment = AlignmentType.Right;
tab1.SetColumnTextInfo(2,tinfo2);

//we have to reset the upper-right cell
tinfo1.Alignment = AlignmentType.Right;
tab1.Rows[0].Cells[2].DefaultCellTextInfo = tinfo1;

[VisualBasic]
Dim pdf1 As Pdf = New Pdf()
Dim sec1 As Section = pdf1.Sections.Add()

Dim tab1 As Table = New Table()
sec1.Paragraphs.Add(tab1)
tab1.ColumnWidths = “60 100 100”

Dim tinfo As TextInfo = New TextInfo()
tinfo.FontName = “Courier”

tab1.DefaultCellBorder = New BorderInfo(CType(BorderSide.All, Integer), 0.1)
tab1.DefaultCellTextInfo = tinfo

Dim darr() As Double = New Double() {1.5, 3.1415926, 100000, 20, 4000, 30.4512, 45.67, 890, 23.45}

tab1.ImportArray(darr, 0, 0, False)

'set background color for the first row
Dim tinfo1 As TextInfo = tinfo.Clone()
tinfo1.BackgroundColor = New Aspose.Pdf.Color("#0000ff")
tab1.Rows(0).DefaultCellTextInfo = tinfo1

'right align text in the last column
Dim tinfo2 As TextInfo = tinfo.Clone()
tinfo2.Alignment = AlignmentType.Right
tab1.SetColumnTextInfo(2, tinfo2)

'we have to reset the upper-right cell
tinfo1.Alignment = AlignmentType.Right
tab1.Rows(0).Cells(2).DefaultCellTextInfo = tinfo1

Please download hot fix here.


#7

Dear customers,

Thanks for your consideration.

In this fix:

1) Importing data from DataView is now supported. A new method ImportDataView is added to Table class.

2) Page border is now supported. Please view thread Page Borders for customer requirement. Two new properties PageBorder and PageBorderMargin are added to Section.PageInfo. Here is an example about how to set page border.

3) Section.Clone() is added to support section cloning.

[C#]
Section sec1 = pdf1.Sections.Add();
sec1.PageInfo.PageBorder = new BorderInfo((int)BorderSide.All,0.2F);
sec1.PageInfo.PageBorderMargin.Left = 20;

sec1.Paragraphs.Add(new Text(“Hello World”));


[VisualBasic]
Dim sec1 As Section = pdf1.Sections.Add()
sec1.PageInfo.PageBorder = New BorderInfo(BorderSide.All, 0.2)
sec1.PageInfo.PageBorderMargin.Left = 20


[XML]





Hello World





Please download hot fix here.


#8

Dear customers,

Thank you for considering Aspose.

In this fix:

1) A new property IsLastPageOnly is added into HeaderFooter class. If you want to display header or footer in the last page of a section only, you can set this property to true. Please refer to Section for more info about HeaderFooter.

2) A new method GetMaxColumnWidth is added into Table class. This method is used to get the maximum column width which allows text in all cells in the column be shown in one line. For example,if the text is “Thank you for considering Aspose”,GetMinColumnWidth(int) will return the width of “considering”,and this method will return the width of “Thank you for considering Aspose”.

3) A new method GetObjectByID is added into Pdf and Section class. This method is used to get a object in Pdf or Section through it’s ID.

Please download hot fix here.



#9
  1. Deep in my XML nodes I have this block:


    Company GmbH
    #$NLPostfach 91 02 20
    <Segment $NLD-12435 Berlin


    2. In my code I fill the segment with some text like this:

    Dim segmentAddressLine As Segment = CType(m_Section.GetObjectByID(“AddressLine”), Segment)
    segmentAddressLine.Content = "this is a new address from the code with GetObjectByID"

    3. Yet when it executes, I get this error:

    Object reference not set to an instance of an object.

    What am I doing wrong? How can I reference the object so that I can change its content?

    Thanks,
    Edward



#10

Dear Edward,

Thank you for considering Aspose.

I can’t reproduce this error. Maybe your XML file is more complex. Would you please send the complete XML file to me?


#11

Dear Edward,

Thank you for considering Aspose.

You got the second section with code “Dim sec1 As Section = pdf.Sections(1)”. But The “PageInfo” segment is in the first section. When I change the code to “Dim sec1 As Section = pdf.Sections(0)” , it works well.