I am using word-wrap:break-word; in custom style for generating PDF file. but I am getting below exception

0
I am using "word-wrap:break-word;" in custom style for generating PDF file. but I am getting below exception, So please guide me how to resolve this issue. Same template  is working fine for Word document. but it is getting error while generating PDF file only.   com.mendix.modules.microflowengine.MicroflowException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:table-cell": word-wrap (See position 4:5009)                 (DocumentExport : 'Generate PDF (.pdf) document using template 'Export'')   Advanced stacktrace:                 at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:143)   Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:table-cell": word-wrap (See position 4:5009)                 at com.mendix.documentexporter.documents.PDFDocument.generateInputStream(PDFDocument.java:76)   Caused by: net.sf.saxon.trans.XPathException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:table-cell": word-wrap (See position 4:5009)
asked
4 answers
2

In my opinion document templates are an outdated feature of the Mendix platform. They tend to give issues with CSS styling. You might want to consider saving yourself a lot of time and use a 3rd party solution.

https://docs.mendix.com/refguide/how-to-create-your-own-documents#5-alternative-ways-of-creating-documents-a-name-alternative-a

answered
1

I ran into the same issue and unfortunately word wrap does not fix the issue or any other css solution. The only thing that worked for me was to insert zero width spaces into the string. 

Credits to this post: 

https://forum.mendix.com/link/questions/2737

answered
1

Hi satyanarayana.palepu,

try using is code,

text-indent: 5em;

in the label custom Style.

answered
0

also take a look at this.

https://forum.mendix.com/link/ideas/1097

answered