I Just realized the PDF instruction did not show how to use the PDF Style Property under PDF Creator

Continuing the discussion from Using App Connect PDF Creator:

Hi I am confuse as how to use "Class Name" in the PDF Style Properties @Teodor. Can any explain to me how to apply styling in PDF Creator:
To make this
...

Look like this
...

So I believe there might be a Bug within the PDF Style property. I tried this instruction

and when I tried to open the PDF in the browser it makes the whole PDF blank. I will post a video of this to explain.

Alright here is a visual of the problem I am having with PDF Style property @patrick

https://www.screencast.com/t/9GRXulz5

PDF doesn't render HTML, it uses Aymkdn/html-to-pdfmake (github.com) to convert the html to a format that bpampuch/pdfmake (github.com) understands. Only limited HTML tags are supported and css is not supported at all. We detect some Bootstrap classes that we than convert to simular styling in the PDF.

It looks to me that you have rows/columns, for the PDF we only support evenly columns. Having 2 columns with col-12 as class will render a single column in the browser, placing them under each other. In the PDF this is created as 2 columns next to each other. To have them under each other you have to wrap them both in a separate row div.

Do you get any JavaScript error if you check the console in DevTools?

1 Like

Thanks for that info Patrick. I did not get JavaScript error relate to it, But can send you the error via image.

Looks like it is the font property of the style that is causing the error. I will check if I can do something about that. Removing the font Arial will probably fix it for now.

According to the pdfmake documentation only Courier, Helvetica, Times and Symbol are supported as standard fonts within a PDF. Will have to look if we have to limit it to those fonts or that we can apply more font families.

pdfmake standard 14 fonts

1 Like