Hi,
Is there a guide available to help me make the necessary changes from Aspose.Words 4.0.2 to 9.5? (Using C#)
For example, I've got "Borders borders = builder.CellFormat.Borders" in my code, changing to 9.5, Borders is no longer supported. What should I do to correct this please?
Thank you.
Hi there,
Thanks for your inquiry.
There were some breaking changes to the API members in versions 5.0 and 9.2. You can find the details regarding the changes in the 5.0 version on the download page here. The changes involve collection classes such as Paragraphs changing to ParagraphCollection. There were also some reworking of namespace names.
You may have some other code that needs fixing as well due to the API changes in version 9.2. You can find details of these here.
Thanks,
Collection classes: does this mean I have to just rename a Tables to TableCollection, etc.? Do I have to add these additional name spaces?
An example of my 4.0.2 code is below. Any suggestions on fixing it for 9.5?
Thanks!
--------------------------------------------------------------
using Aspose.Words;
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Borders borders = builder.CellFormat.Borders;
Funtion1(builder, borders);
public void Function 1(DocumentBuilder builder, Borders borders)
{
builder.StartTable();
borders.Bottom.LineStyle = LineStyle.Thick;
borders.LineWidth = 2;
borders.Color = System.Drawing.Color.Gray;
borders.Top.LineStyle = LineStyle.None;
borders.Left.LineStyle = LineStyle.None;
borders.Right.LineStyle = LineStyle.None;
builder.Font.Size = 12;
builder.Writeln(“Title”);
builder.InsertCell();
builder.Write(“Sign”);
builder.InsertCell();
builder.Writeln(“Date”);
builder.EndRow();
borders.Top.LineStyle = LineStyle.None;
borders.LineWidth = 0;
borders.Color = System.Drawing.Color.White;
builder.InsertCell();
builder.Writeln(“Bob”);
builder.Writeln(“Smith”);
builder.InsertCell();
builder.Write(“Name”);
builder.EndRow();
builder.EndTable();
}
Hi there,
Thanks for this additional information.
Yes that is correct. In your code snippet that you attached you only need to change the class Borders to BorderCollection and it will work.
Thanks,