Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble changing background color of the pages of a PDF
#1
I'm using version 2.10.38 (revision 1)

When I export as a PDF it always turns transparent backgrounds of layers to white, no matter what I try.

So I have three visible layers. I select Layers as pages (bottom layers first), i also select Fill transparent areas with background color. I also have the background-color in the little square on the left side of the screen set to black. I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.

Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.
Reply
#2
Works for me (checked 2.10.34 and 3.1.3). How do you check the result? It could be a problem with your PDF viewer?

   
Reply
#3
(08-24-2025, 09:59 AM)tomatoSauce23 Wrote: I'm using version 2.10.38 (revision 1)
...snip....
I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.

Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.

As Ofnuts points out the background color is not the same as the background layer.  You can change the background color to black.

Also for Gimp 2.10.38 there is an old script which merges the background layer with all layers, originally meant for animations, looks like this: https://i.imgur.com/A39SdZZ.mp4

Attached, unzip and put in your scripts folder.


Attached Files
.zip   sg-combine-bg.scm.zip (Size: 1.26 KB / Downloads: 21)
Reply
#4
(08-24-2025, 10:36 AM)Ofnuts Wrote: Works for me (checked 2.10.34 and 3.1.3). How do you check the result? It could be a problem with your PDF viewer?

So while it does work for me as you demonstrated when I export as a JPEG, or as a PDF with only one layer, when I try and make a PDF which makes a new page for each Layer of my GIMP image (all of which Layers have transparent areas in them) it will apply the Background Color to the transparent areas of the first page only, but the transparent areas of the rest of the pages will be filled with white.

I don't think there's a problem with my PDF viewer as I use Google Chrome for that.

(08-24-2025, 11:57 AM)rich2005 Wrote:
(08-24-2025, 09:59 AM)tomatoSauce23 Wrote: I'm using version 2.10.38 (revision 1)
...snip....
I have a visible layer in the layers-dialogue filled with black and labelled "Background", and placed at the bottom of the layers stack.

Yet still, any transparent areas in each layer will be filled with white. Deselecting Fill transparent areas with background color will still fill them with white also, as though it's disregarding that option altogether.

As Ofnuts points out the background color is not the same as the background layer.  You can change the background color to black.

Also for Gimp 2.10.38 there is an old script which merges the background layer with all layers, originally meant for animations, looks like this: https://i.imgur.com/A39SdZZ.mp4

Attached, unzip and put in your scripts folder.

Thank you for that. That could be the solution to use. I'd just like to see if I can get the Background Color to apply to every Layer of the PDF first before I turn to a Script...
Reply
#5
Quote:.......I don't think there's a problem with my PDF viewer as I use Google Chrome for that.

A web browser will generally replace transparency with white.

Quote:    I'd just like to see if I can get the Background Color to apply to every Layer of the PDF first before I turn to a Script...

That is the best way, when you eventually move to Gimp 3 then those old scripts/plugins do not work.

Prove the concept to yourself. Make an image with layers and "transparent" holes in the layers.  then for any particular layer Layer -> Transparency -> Remove Alpha Channel   Try using different background colours.  That is what happens for the layers when you export your PDF.

   
Reply
#6
Reported the bug.
Reply


Forum Jump: