Use Markdown Format and page breaks in PDF Templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ulat
    Junior Member
    • Sep 2021
    • 21

    Use Markdown Format and page breaks in PDF Templates

    Is there a way to use markdown in the description field of quotes? I would like to insert larger descriptions of planned projects in quotes. I have added a textfield for the description but I cannot use any format there. Is there a way to use markdown in textfields that's correctly formatted when generating pdfs?

    How can I add page breaks in pdf-templates?

    Thnkas for you help!
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1602

    #2
    There is a thorough manual for PDF.

    Textfields: https://docs.espocrm.com/user-guide/...df/#text-field
    I don`t remember, if that displays markdown in the PDF, try it (triple braces).

    Pagebreak: https://docs.espocrm.com/user-guide/...#page-breaking
    If you want the break on a certain place to not break a record within an each iterator, you can use:

    <tr style="page-break-inside: avoid;"> for starting the each table.

    Be aware to create PDF Templates only in the code view, the WYSIWYG often messes up. These hints work in TCPDF engine, I did not test with DOMPDF.

    Comment

    • ulat
      Junior Member
      • Sep 2021
      • 21

      #3
      I can use markdown in Textfields and the markdown is rendered on the userinterface. But if I generate a pdf document, the pdf contains the raw markdown text without format. Is there a way to convert markdown text content to pdf?

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1602

        #4
        Did you try to use triple brackets for the markdown fields? {{{markdown}}}

        Comment

        • ulat
          Junior Member
          • Sep 2021
          • 21

          #5
          Yes, I use triple brackets....

          Comment

          • yuri
            Member
            • Mar 2014
            • 8440

            #6
            I've just implemented it for the next version: https://github.com/espocrm/espocrm/issues/2925
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            Working...