jasperreports icon indicating copy to clipboard operation
jasperreports copied to clipboard

Docx Export: Last Page Footer overflow to the next page

Open dev000il opened this issue 1 year ago • 2 comments

hi there: when i tryed to set the property 'net.sf.jasperreports.export.docx.flexible.row.hegiht' to the report,i found some static text of element Last Page Footer overflow to the next page, it is not corrected loaction on the foot of the last page. i was new to the jasper , hope for some advice Thanks

dev000il avatar May 13 '24 09:05 dev000il

You need to attach some files here so that we can see the problem. The JRXML is important.

Thanks, Teodor

teodord avatar May 13 '24 11:05 teodord

here is my report file ReturnOrderForMoney.zip

dev000il avatar May 14 '24 01:05 dev000il

Are you sure that the font you are using (微软雅黑) exists both on the machine that generates the report and also on the machine where the DOCX file is viewed? If it indeed exists, is it really the same TTF as the one you have mentioned in your JRXML (MSYH.TTF)? The recommended way to ensure the font exists on the machine that runs the report is to package it up as a JasperReports font extension (using Jaspersoft Studio). If you do that, you would not need the pdfFontName, pdfEncoding and isPdfEmbedded attributes in JRXML anymore as they are somewhat deprecated by the introduction of font extensions many years ago. Also, to ensure the font exists on the machine that views the DOCX file, you can embed the font into the DOCX by setting this property: https://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.export.docx.embed.fonts

I hope this helps. Teodor

teodord avatar May 14 '24 06:05 teodord