export to pdf issue


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

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?

There aren’t any API to control columns size in ExportTools.
You could just change it on client side - it’ll be recalculated automatically.


So what part of the JAVA code should i modify to make the cell text smaller so i don’t get the … wraping?

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 {
		PDFRow[] rows = parser.getGridContent();
		double[] rowColor;


				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?

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?

We don’t have any plans to change PDF library.