Page 1 of 2
Bug: CSS Bug with Designer and Viewer
Posted: Wed Jun 14, 2017 9:04 am
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.
Re: Missing Fonts in Desingers generated PDF
Posted: Thu Jun 15, 2017 6:37 pm
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.
Re: Missing Fonts in Desingers generated PDF
Posted: Thu Jun 15, 2017 9:51 pm
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.
Re: Missing Fonts in Desingers generated PDF
Posted: Thu Jun 15, 2017 9:56 pm
by harryf75
I do more investigation on this. I am (almost sure) it's somhow a stupid thing i am doing...
Re: Missing Fonts in Desingers generated PDF
Posted: Sat Jun 17, 2017 2:45 pm
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!
Re: Missing Fonts in Desingers generated PDF
Posted: Sat Jun 17, 2017 3:02 pm
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...
Re: Missing Fonts in Desingers generated PDF
Posted: Sun Jun 18, 2017 2:36 pm
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.
Re: Bug: CSS Bug with Designer and Viewer
Posted: Mon Jun 19, 2017 10:02 am
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.
Re: Bug: CSS Bug with Designer and Viewer
Posted: Mon Jun 19, 2017 11:23 am
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...
Re: Bug: CSS Bug with Designer and Viewer
Posted: Wed Jun 21, 2017 9:57 pm
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.