1

I'm trying to insert an image that has a transparent background into a PDF document using ODS. When I check the created PDF file, the image is using a white background. My code looks like this:

ods escapechar="~";
ods text="~{STYLE [preimage='transparent_test.gif?width=3.62in&height=1in']}";
Robert Penridge
  • 8,424
  • 2
  • 34
  • 55

1 Answers1

2

Use an SVG file with a transparent background instead:

ods escapechar="~";
ods text="~{STYLE [preimage='transparent_test.svg?width=3.62in&height=1in']}";

It does not seems to work with either gif nor png files, but svg should work fine.

Here is the SVG image (external link as neither SO nor imgur support SVG):

http://svgur.com/s/3FU

goptions transparency; seemed like it may have shown promise but based on my testing it had no effect.

Robert Penridge
  • 8,424
  • 2
  • 34
  • 55