PDF template to print the label based on quantity

The client would like to print the item label based on the quantity ordered in the sales order <?xml version=“1.0”?> <!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”> <pdf>     <pdfset>         <head>             <link name=“NotoSans” type=“font” subtype=“truetype” src=“${nsfont.NotoSans_Regular}” src-bold=“${nsfont.NotoSans_Bold}” src-italic=“${nsfont.NotoSans_Italic}” src-bolditalic=“${nsfont.NotoSans_BoldItalic}” bytes=“2” />          … Continue reading PDF template to print the label based on quantity

Sales order PDF template

The client would like to create a PDF template by clicking the print button from the sales order record. We have customized the advanced pdf template and applied it to the forms used for creating the sales order. <?xml version=”1.0″?><!DOCTYPE pdf PUBLIC “-//big.faceless.org//report” “report-1.1.dtd”> <pdf> <head> <link name=”NotoSans“ type=”font“ subtype=”truetype“ src=”${nsfont.NotoSans_Regular}“ src-bold=”${nsfont.NotoSans_Bold}“ src-italic=”${nsfont.NotoSans_Italic}“ src-bolditalic=”${nsfont.NotoSans_BoldItalic}“ bytes=”2“… Continue reading Sales order PDF template

Is there a built-in in Freemarker that allows me to entirely remove HTML tags from a string?

You could use the Freemarker built-in string replace function with the “r” flag to enable regular expressions. Here’s a simple regexp that does the trick: ${page_title?replace(‘<[^>]+>’,”,’r’)} Note that if you use backslashes within the regular expression they must be escaped, as follows (contrived example that removes whitespace): ${page_title?replace(‘\s+’,”,’r’)}