Skip to main content

Font in the printed PDF

Comments

3 comments

  • Prajakta

    Please take a look at Print View theme customizations. I believe this is what you are looking for.

     

    I tried adding following CSS class to my theme’s common.css file:

    .s-print {

                    font-family:"Brush Script Std",'Edwardian Script ITC', 'Monotype Corsiva','Lucida Handwriting',Times;

                    font-style:Italic;

                    font-size:14pt;

    }

    And it applied the correct font to all the fields in the print PDF.

     Please let us know if this answers your question.

    0
  • Forum User

    I created some custom CSS that looks like this:

     

    .s-print form {           

                    font-family: unifont;

    .s-print .f-form label {

                    font-family: unifont;

                    background-color: yellow;

    }

    .s-print .f-input .input, .s-print .f-select1 .select, .s-print .f-select1 .textarea, .s-print .f-select .textarea, .s-print .f-textarea .textarea {

                    font-family: unifont;

    }

     

    However, the pdf is created without the CSS style information. Meaning, the pdf is created but the font information does not come over. 

    0
  • Prajakta

    By default frevvo PDF supports a set of only 14 base fonts:

    • Times (v3) (in regular, italic, bold, and bold italic)
    • Courier (in regular, oblique, bold and bold oblique)
    • Helvetica (v3) (in regular, oblique, bold and bold oblique)
    • Symbol
    • Zapf Dingbats.

    The renderer we are using does a fall-back to a supported font if the font-family style specified on the form/theme is not one of the 14. 

    It is possible to add alternative fonts when generating a pdf. If you wish to use unifont font-family then you will need to add the unifont.ttf file to <frevvo-install-dir>\frevvo\tomcat\webapps\frevvo\WEB-INF\fonts directory and restart frevvo.

    I tested this using the unifont.tff file from the attached unifont.zip.

    I have also attached the theme (Testing_theme2.zip) file that I used in my test. It has following CSS classes in its commons.css file:

    .s-print form {           

                    font-family: unifont;

    .s-print .f-form label {

                    font-family: unifont;

                    background-color: yellow;

    }

    .s-print .f-input .input, .s-print .f-select1 .select, .s-print .f-select1 .textarea, .s-print .f-select .textarea, .s-print .f-textarea .textarea {

                    font-family: unifont;

    }

     

    Please let us know if this helps you.




    Testing_theme2.zip
    unifont.zip
    0

Please sign in to leave a comment.