I'm trying to export a grid to pdf, but the pdf it has generated puts all the data in one long line.
I've tried the direct way, and a indirect way (first generating plain html) for debugging purpose to check if the HTML it tries to render is perhaps malformed.
But the plain html renders just fine as a normal print preview/html table.
Attached are the print preview HTML and a png with a screenshot of the PDF (the forum didn't allow me to upload a pdf)
I've tried the direct way, and a indirect way (first generating plain html) for debugging purpose to check if the HTML it tries to render is perhaps malformed.
But the plain html renders just fine as a normal print preview/html table.
Attached are the print preview HTML and a png with a screenshot of the PDF (the forum didn't allow me to upload a pdf)
Code:
Object[] components = new Object[]{ resultGrid};
Canvas.getPrintHTML(components, null, new PrintHTMLCallback() {
@Override
public void setHTML(String html) {
DSRequest requestProperties = new DSRequest();
requestProperties.setExportFilename("File");
requestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);
requestProperties.setContentType("application/pdf");
//requestProperties.setDownloadResult(true);
GWT.log(html);
RPCManager.exportContent(new HTMLFlow(html), requestProperties);
}
});
Comment