Hello, On our Purchase orders, we have users that ...
# advancedpdf
m
Hello, On our Purchase orders, we have users that either copy/paste text from a website, excel or PDF filed into the Memo/Description field of the line items. At the time of printing/generating the PDF file for the PO, this information, 1. It errors out with this error: Element type "br" must be followed by either attribute specifications, ">" or "/>". 2. It doesn't continue to the next page of the PDF. 3. The PDF stops right there and it doesn't continue with the following item lines. • Could some special/hidden characters might be causing that? • Have you come across an issue like this? I will appreciate any info you can share. Thank you
n
My understanding is it's a difference between HTML/ XML / XHTML. In HTML, in the case of what is being pasted, br is fine, but with the parser expecting XHTML, unclosed tags are not acceptable so all br should really be br / and that's likely why it's breaking. The error message itself points to this, it's expecting either br ... /br or in the case of a break br / which would be "more correct" if that makes sense! I'm not an html / xml / xhtml "expert" but if you google "what's the difference between br and br /" I think you'll find it's talked about plenty.
☝️ 1
m
Thanks a lot for the info. It looks like since we are truncating the Description field we display, it includes double quotes and other characters that seems to be leaving open tags.
a
Also watch out for Rich Text fields. Those have a tendency to go crazy and mis-parse, especially with pasted-in contents.
b
First, check the problematic purchase order line description And also look for <br>, <div>, unmatched HTML tags, special characters like &. then confirm by replacing the description with plain text and regenerating PDF.