hi,
is there a way that i can control the size of the grid text when exporting to pdf because all the text appear with “…”.
When i go to print and then use the microsoft to pdf exporter it works pretty good but when i use your service it just does not work as expected.
10x in advance
radyno
June 23, 2011, 10:15am
#2
Hi.
Column sizes are calculated automatically. Columns have sizes proportional with your dhtmlxGrid.
Unfortunately there is no way to control sizes by API.
You could do this one just by code customization.
Will there be some normal JAVA API for exporting to pdf?
radyno
June 27, 2011, 4:01pm
#4
There aren’t any API to control columns size in ExportTools.
You could just change it on client side - it’ll be recalculated automatically.
Ok…
So what part of the JAVA code should i modify to make the cell text smaller so i don’t get the … wraping?
radyno
July 4, 2011, 2:12pm
#6
Have a look file PDFWriter.java. It contains method:
private void printRows() throws Exception {
PDFRow[] rows = parser.getGridContent();
This method draws rows. So you can set font size at the beginning of this method and after headerPrint() call in the same method:
private void printRows() throws Exception {
f1.setSize(5);
PDFRow[] rows = parser.getGridContent();
double[] rowColor;
...
headerPrint();
f1.setSize(5);
y = offsetTop + headerHeight;
}
x = offsetLeft;
}
}
Argument of f1.setSize method is font-size.
Ok 10x we are almost there…
so now…
how do i make the exported pdf file support UTF-8 characters and how do i change the rows height?
radyno
July 5, 2011, 10:43am
#8
Export to PDF tool is based on pdf-lib for java. This library doesn’t support UTF-8 correctly. So our export tool can’t work with UTF-8.
To change row height modify lines:
public double lineHeight = 20; // for content line
public double headerLineHeight = 30; // for header line
in file PDFWriter.java
will there be soon some normal java version that is going to support Cyrilic or i have to look for another library and do it myself?
radyno
July 6, 2011, 8:33am
#10
We don’t have any plans to change PDF library.