Bug: CSS Bug with Designer and Viewer

Stimulsoft Reports.JS discussion
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Bug: CSS Bug with Designer and Viewer

Post by harryf75 »

Edit: Changed Topic from "Missing Fonts in Desingers generated PDF" - it's a bug that happens when certain CSS is set to the Designer and the Viewer (at last on Chrome)

Hello,

I have an exported PDF that is not matching to the Desginer Preview.

However the Word Export works.

Also I tried to embedd and not embedd the Fonts but that makes no difference.

On the NodeJS Server we have this call:

Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("./reporting/Roboto-Black.ttf");

But I found no specifications to add that for the desingner in the Samples.

Any Hints?

Thx & Greetngs from Beriln.
Attachments
missing-font.png
missing-font.png (42.24 KiB) Viewed 6286 times
Last edited by harryf75 on Sun Jun 18, 2017 2:37 pm, edited 1 time in total.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Missing Fonts in Desingers generated PDF

Post by HighAley »

Hello.

Could you send us the font file that you are loading?
There could be a problem with some versions of this font.

Thank you.
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Missing Fonts in Desingers generated PDF

Post by harryf75 »

HighAley wrote:Hello.

Could you send us the font file that you are loading?
Thank you.
I don't load any font. I have a Bootstrap 4 / Angular 4 Theme.

I do no load of a font. Just starting the designer. Event without any preloaded reports this happenes.
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Missing Fonts in Desingers generated PDF

Post by harryf75 »

I do more investigation on this. I am (almost sure) it's somhow a stupid thing i am doing...
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Missing Fonts in Desingers generated PDF

Post by harryf75 »

Hello,

i can confirm now that this is a Stimulsoft JS Bug in combination with certain CSS.

The Bug can easily reproduced with the GitHub Samples. This took me hours and hours of debuging ;)

https://raw.githubusercontent.com/stimu ... index.html

Please add a style="display: flex; flex-direction: column;" to the body tag.

Using a flexbox layout is very common in our day. When adding this - something crazy happens! The PDF Files gets corupted - however the Word Files are ok.

Please confirm if you an reproduce the bug.

Thank you!
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Missing Fonts in Desingers generated PDF

Post by harryf75 »

Ok what seams to work is to remove the CSS class from the body that has this style set and add it again after the report ist closed...
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Missing Fonts in Desingers generated PDF

Post by harryf75 »

Some crazy little other bug. When setting

style="display: flex; flex-direction: column;"

the word wrap in TextFields doesn't work. The text will be placed not wrapped but in single letters top down.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Bug: CSS Bug with Designer and Viewer

Post by HighAley »

Hello, Harry.

I have to clarify the way our product works. The report is rendered bu our report engine to our internal format. For the Viewer the rendered report is exported to HTML.
When you call the PDF export the rendered report is exported to PDF format. So the css styles can't affect the PDF export.
If you use any custom font, you should add it to the StiFontCollection. Or you get the issue with missed font.

Thank you.
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Bug: CSS Bug with Designer and Viewer

Post by harryf75 »

Hello HighAley,

i add no custom font in any way! The first post was terrible wrong!!!

Steps to reproduce:

1) Checkout https://github.com/stimulsoft/Samples-JS
2) Edit File "Samples-JS/Angular2/01. Working with report designer/src/index.html"
3) Add style="display: flex; flex-direction: column;" to the <body> tag
4) npm install
5) npm start
6) Open the Designer and Export PDF

Please confirm that this is right or wrong...
harryf75
Posts: 20
Joined: Sun Jun 11, 2017 9:59 pm

Re: Bug: CSS Bug with Designer and Viewer

Post by harryf75 »

Hello guys,

can you please confirm that with my reproduce list?

It will take you 4 minutes - it took me 2 days to find this bug ;)

Thank you.
Post Reply