Right to Left (RTL) output on PDF and Hebrew
This article includes some tips and tricks to do RTL output on forms and PDFs with Logiforms:
Forms
On forms, the following custom CSS can be included to change the direction of text from RTL. Note, this is a basic example and form field positioning and labels are not affected. This CSS also includes the use of a font to style with Hebrew.
In the form designer:
- Click on the forms Root Node
- Under the Properties Panel, expand the "General Settings" Panel
- Click on Custom CSS
- Enter the text below
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;700&display=swap'); .lfbody input, .lfbody textarea, .lfbody button, .lfbody a, .lfbody .fl{ font-family: 'Noto Sans Hebrew', sans-serif !important; direction:rtl !important; } .lfbody input, .lfbody textarea, .lfbody button, .lfbody a, .lfbody select{ font-family: 'Noto Sans Hebrew', sans-serif !important; direction:rtl !important; } .lfbody *{ direction:rtl !important; text-align:right; }
The resulting form will look like this:
PDFS
Add the following style section just below the last style section of a Dynamic PDF to adjust all text within the PDF to use RTL output. This CSS also includes the use of a font to style with Hebrew.
<style id="rtl-css" type="text/css">
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@400;700&display=swap');
.lfbody input, .lfbody textarea, .lfbody button, .lfbody a{
font-family: 'Noto Sans Hebrew', sans-serif !important;
direction:rtl !important;
}
.pdfbody td, .pdfbody tr{
font-family: 'Noto Sans Hebrew', sans-serif !important;
direction:rtl !important;
}
</style>
Inserted below the last <style> tag, and just before the closing </head> tag. This ensures it overrides any other CSS:
The resulting PDF, will look like this:
0 Comments