Hello everyone,
I am trying to generate a pdf file with the background images using "generatePdf()".
On the page, if I print by using browser's default print, I can check "background graphics" option to be able to see the background image.
But through "generatePdf()", I haven't found a way of getting the background images showing.
Any suggestions?
Many thanks.
regards,
Edwina
generatePDF not working if have background image
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
-
- Moderator
- Posts: 415
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Hello Steve,
I am not going through IIS to access Ebase.
I am using to set the background image on my before page script.
Also tried
., and set the image in the class.
Both way, background images will show on the html page, but not displaying when I use "generatePdf()"
thanks,
Edwina
I am not going through IIS to access Ebase.
I am using
Code: Select all
ctrl.setStyle("background-image:url();")
Also tried
Code: Select all
ctrl.setCssClass()
Both way, background images will show on the html page, but not displaying when I use "generatePdf()"
thanks,
Edwina
0 x
-
- Moderator
- Posts: 415
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi Edwina,
I have just test this by setting the background image URL from the workspace and relative to the server. Both work.
Could you export your form and the image you are setting as the background. I will test this for you. Please send to support@ebasetech.com
I have seen problems with the format of the image and had to recreate the image using an imaging tool before the image can be displayed in the PDF.
Steve
I have just test this by setting the background image URL from the workspace and relative to the server. Both work.
Could you export your form and the image you are setting as the background. I will test this for you. Please send to support@ebasetech.com
I have seen problems with the format of the image and had to recreate the image using an imaging tool before the image can be displayed in the PDF.
Steve
0 x
-
- Ebase User
- Posts: 24
- Joined: Fri Nov 04, 2016 7:41 pm
Thanks to Steve my issue is solved, just want to write here in case someone else might have the same issue in the future.
I was using base 64 encoding to set my background image.
After I changed it to use a physical image. It worked.
I was also trying to overlay two background images.
This only works when I set one background by using
and the other using and set the second image url in the "ImageC" class.
Hope this helps.
Edwina
I was using base 64 encoding to set my background image.
Code: Select all
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAG0lEQVQYV2NkYGD4z8DAwMgABXAGNgGwSgwVAFbmAgXQdISfAAAAAElFTkSuQmCC);
I was also trying to overlay two background images.
This only works when I set one background by using
Code: Select all
ctrl.setStyle("background-image:url(...)");
Code: Select all
ctrl.setCssClass("ImageC");
Hope this helps.
Edwina
0 x
Who is online
Users browsing this forum: No registered users and 2 guests