Hi,
We just upgraded from version 5 to version 7 and we are getting a number of "This class is obsolete. Use XXX instead" compiler warnings.
For example, it recommends using "Table2" instead of "Table" and "Row2" instead of "Row". I tried switching, only to discover that row2 does not support the BackgroundColor or TextColor properties. It appears that those will now have to be set individually for the cells in the row.
Is there a document anywhere that describes the version changes, perhaps with suggestions for how to deal with such changes?
Version 5 to 7 changes...
Re: Version 5 to 7 changes...
Support · Feb 26, 2013Hello,
The cell formatting properties that were available in the Row class are moved into Row2.CellDefault
class in v7. The code below will set the color and alignment properties for all cells within that row.
Row2 row1 = table.Rows.Add(40, Font.HelveticaBold, 16, Grayscale.Black, Grayscale.Gray);
row1.CellDefault.BackgroundColor = RgbColor.White;
row1.CellDefault.TextColor = RgbColor.Black;
row1.CellDefault.Align = TextAlign.Center;
row1.CellDefault.VAlign = VAlign.Bottom;
If you wish to set them at table level, you can do so using Table2.CellDefault
class. The code below will set the color and alignment properties for all cells within the table.
Table2 table = new Table2(0, 0, 600, 600);
table.CellDefault.BackgroundColor = RgbColor.White;
table.CellDefault.TextColor = RgbColor.Black;
table.CellDefault.Align = TextAlign.Center;
table.CellDefault.VAlign = VAlign.Bottom;
More info on how the Cell2, Row2 and Table2 formatting works in available here: http://www.dynamicpdf.com/Support/NET_Help_Library_13_01/Tables.html
Thanks,
ceTe Software Support Team.
Re: Version 5 to 7 changes...
Forum member · Feb 26, 2013Hi,
Thanks...that will help with the warnings I'm getting. Although I assume that the existing code will still function as it did?
But the bigger question is...is there any central document that identifies the changes from one version to another. Most upgrades include a list of "what's changed". I'd expect to have to review two documents (v5 to v6 and v6 to v7)...but it sounds like you don't have anything that summarizes the changes.
We use your software in a number of our internal applications, which are all going to need to be upgraded. Having even a general list of the changes would be very useful.
Re: Version 5 to 7 changes...
Support · Feb 26, 2013Hello,
General list of changes between the versions are listed in the version notes. Please see the links below.
http://www.dynamicpdf.com/Products/DynamicPDFForNET/Generator/Compatibility.csp
http://www.dynamicpdf.com/Products/DynamicPDFForNET/Suite/Compatibility_v6.csp
Thanks,
ceTe Software Support Team.
Re: Version 5 to 7 changes...
Forum member · Feb 27, 2014We have even issues with precise table layout. Can you explain how exactly you position the Table2 and it's contents regarding border width, padding etc.?
How to instruct Table2 to obtain the same visual output as with Table?
The new tables are offset mostly to the right and bottom. This incompatibility means we'll have to redesign all our reports that are using tables.
Re: Version 5 to 7 changes...
Support · Mar 3, 2014Hello,
The properties used to set the cell padding, text alignment have been moved to CellDefault class. Please refer to the CellDefault class members here
. Also you will need to make some changes in your code accordingly to meet the desired table layout using Table2 page element. Below is the code sample for setting the cell padding and table border for Table2 page element.
CellPadding paddingObj = table2Obj.CellDefault.Padding;
paddingObj.Value = 3.0F;
table2Obj.Border.Width=2.0F;
Thanks,
ceTe Software Support Team.
Re: Version 5 to 7 changes...
Forum member · Mar 3, 2014Hello support,
I'm using CellDefault properties, but it's visual result is different from the previous version:
- the border thickness is doubled
- the position of the table is offset
- padding is different
I've tried to fix it, but it's not exactly the same. And I thought someone had to have the same problem before to get some help or advices.
Re: Version 5 to 7 changes...
Support · Mar 3, 2014Hello,
Please send over the following details to our [^a|mailto:support@cete.com|opennewwindow|support^] team so that they can look into it further?
1.Output PDFs (Table and Table2 page elements).
2.Sample code which uses static data using which we can recreate the behavior (Table and Table2).
3.Exact build number of the DLL files. You can get this information using Visual Studio References properties of the DynamicPDF DLL file.
Thanks,
ceTe Software Support Team.