If you are using Orbeon and create xForms and PDFs outside of form builder and form runner, then this tip might help if you come across a PDF generation error.
When using the rich text editor, tags are placed within your xml text(). when sending this text to xsl-fo, you have to apply-templates which convert the html tags to xsl-fo structure so the formatting can be rendered. An error that I was encountering is if a person put a double space within the text or between sentences. The PDF would throw an error upon opening. After looking at what was being stored in the xml, I noticed: . This is what was throwing the error.
To simply correct, when the user exits the rich text editor I called the orbeon event DOMFOcusOut. I thne used the setvalue to replace the same node with a copy of itself, minus the . To do this just use the replace function. So something like this:
<xforms:setvalue ref="instance('yourinstance')..." value="replace(instance('yourinstance').., '&nbsp;', ''" />
Note that I had to escape the & with &.
That is it. Any questions contact us. http://btmsoftwaresolutions.com/.
Hair Care Product Deals
13 years ago
No comments:
Post a Comment