PDF - Column header color not shown, text moved

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Dave, Jon, Steve, Ian

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

PDF - Column header color not shown, text moved

#1

Postby fronsky » Wed Sep 11, 2019 1:10 pm

I use a fpl script to print a form to pdf. Form contains various tables.

Everything ok, except table column headers color are not shown as on screen. Also text in column header is printed centered instead of left aligned.

NB. I use wkhtmltopdf as pdf engine based on earlier advise, because of a linux issue.
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: PDF - Column header color not shown, text moved

#2

Postby Steve » Wed Sep 11, 2019 2:11 pm

Hi Fronsky,

I have just tested this and I could not see any issue with the color and alignment of the column header. I am using the wkhtmltopdf engine as well.

How are you setting the background colors and alignment?

My test for is very basic and I am using the style assistant in the designer to set the color and alignment.

Kind regards

Steve Upton
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#3

Postby fronsky » Wed Sep 11, 2019 2:51 pm

Hi Steve,

I use a property set which comes from the template for all the tables in the form. In the control style for column header a background color and text color is set.

In the browser everything shows ok.
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: PDF - Column header color not shown, text moved

#4

Postby Steve » Fri Sep 13, 2019 3:58 pm

Hi Fronsky,

If you export your form and associated entities and send it to:

support@ebasetech.com

I will take a look for you.

Kind regards

Steve Upton
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#5

Postby fronsky » Fri Sep 20, 2019 11:21 am

Hi Steve,

Thanks for your offer. I've been looking at this issue futher because came across a lot of issues on the internet related to printing bootstrap. I also saw differences when printing to pdf using the browser (as seen on the screen) and using wkhtmltopdf engine to create a pdf.

I'm now at the stage that after changing the CSS a number of times, I have a fairly presentable pdf, when using the internal server on my windows 10 machine.

But there is still a difference between the pdf's between the W10 and an Ubuntu testserver I'm using. Both use wkhtmltopdf now. I must have something to do with differences between the wkhtmltopdf I presume. Any suggestions with regard to that?

Cheers,
Harry
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: PDF - Column header color not shown, text moved

#6

Postby Steve » Fri Sep 20, 2019 11:51 am

Hi,

To get the version you need to open a command window and navigate to the location of the

wkhtmltopdf executable

e.g:

For the Integrated Test Server
<Verjio-Install-Dir>/UfsClient/IntegratedServer/bin

or for the Server:

<Verjio-Install-Dir>/UfsServer/bin

And type in:

wkhtmltopdf --version


You should get version in the format:

wkhtmltopdf 0.12.4 (with patched qt)

Kind regards

Steve
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#7

Postby fronsky » Fri Sep 20, 2019 12:19 pm

I've found this: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2893

Is there a possility to vary with settings for wkhtmltopdf?
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#8

Postby fronsky » Fri Sep 20, 2019 12:36 pm

Steve wrote:
Fri Sep 20, 2019 11:51 am
or for the Server:

<Verjio-Install-Dir>/UfsServer/bin

And type in:

wkhtmltopdf --version
Windows gives the version you mention.

I'm not an Linux guy, so I tried to type the command in the directory, but get "Command 'wkhtmltopdf' not found, but can be installed with: ....". I can see the file. In the file browser it says it's a shared library file.
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: PDF - Column header color not shown, text moved

#9

Postby Steve » Wed Sep 25, 2019 4:19 pm

fronsky wrote:
Fri Sep 20, 2019 12:19 pm
I've found this: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2893

Is there a possility to vary with settings for wkhtmltopdf?
You can only change the DPI setting from the server admin.

Launch the server admin from the studio and the PDF options are located in the General Properties section.

I can see that there could be a need to specifiy -- parameters to the wkhtmltopdf engine.

Have you tried the flying saucer PDF engine? This can be changed in the general properties also.

Kind regards

Steve Upton
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#10

Postby fronsky » Tue Oct 01, 2019 2:24 pm

After experimenting with different versions of wkhtmltopdf, I finally found a solution for my problem using wkhtmltopdf (0.12.5) on Ubuntu 18.04.

My error situation where the pdf viewer was unable to load the pdf, was because of a corrupt generated pdf file. This was in my situation due to the use of MS font in bootstrap 4.

This was solved by installing "ttf-mscorefonts-installer" (https://askubuntu.com/questions/463754/ ... t-i/463760)
0 x

Steve
Moderator
Moderator
Posts: 341
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: PDF - Column header color not shown, text moved

#11

Postby Steve » Tue Oct 01, 2019 4:09 pm

Thanks Fronsky,

I'll add this to our bug database and investigate it further because we have encountered issues with Bootstrap 4 and PDFs ourselves.

The only difference was that we could not get the Bootstrap 4 template to work with an embedded server on Windows. So I am not sure whether this is related.

Thanks for the information.

Kind regards

Steve
0 x

fronsky
Ebase User
Posts: 71
Joined: Thu Mar 08, 2018 2:52 pm

Re: PDF - Column header color not shown, text moved

#12

Postby fronsky » Tue Oct 01, 2019 8:04 pm

Thanks for your reply.

I use bootstrap 4.13 in W10 with embedded server and had just some layout issues with tables, but could make some addition to css which solved that.

Kind regards,
Harry
0 x


Who is online

Users browsing this forum: No registered users and 6 guests