It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

images with 100% width in PDF export

Steffen Heller Dec 12, 2014

Hi,

I just witnessed a strange behaviour.

I have a big image in my wiki page and for the PDF export I want it to fill 100% of the text area (text area = that width that can be filled with text, not the same as full width of the page).

But whatever I try, the image is too small and ends at about 4cm before the right margin of the PDF.

I included ridiculously big images with 3000px width, changed the image width in the source code, set the image width in the PDF to 100% (as described at Expanding embedded images on PDF exports?) and then erased everything I had in my PDF stylesheet but nothing changes.

Is there some kind of limit that can not be extended because that is how it seems?

 

4 answers

1 accepted

3 votes
Answer accepted
Jobin Kuruvilla [Go2Group] Community Leader Dec 12, 2014

This is a known issue. See https://jira.atlassian.com/browse/CONF-33727

The workaround in the global PDF Stylesheet worked for me (See comments):

.confluence-embedded-image
{ -fs-fit-images-to-width: 100% !important; }
0 votes
Steffen Heller Dec 12, 2014

Thanks a lot, Jobin. Perfect answer for me.

0 votes
Steffen Heller Dec 17, 2014

There is a price for everything in life !

I just found out that now that I have included the code from above I have created a new problem:
==> (Some) images within table cells disappear when the page is exported to PDF.

It is all a bit complicated:

  1. When I leave my PDF stylesheet untouched and just comment out that code the images reappear
  2. But I have also had test runs where I changed 500 other things, left that code in and images would also show
  3. For a while I was also puzzled because independent from the above some images showed and others didn't. Then I found out: Images that do not show are only those whose size was NOT changed. Big images that were minimised to e.g. 300px always show.

In the end it seems to come down to some new fancy workarounds:

  • I leave everything as it is for pages with full size images or with resized images in tables
  • I comment out the 100% code for pages with unresized images in tables
  • If none of the above works I do a "fake resize", that is, I click the image and change its size, then I open firebug, go to the page's source code, search for the image's width and change it back to its original value.

 

PS: I am aware of that bug report at https://jira.atlassian.com/browse/CONF-31874 What it describes is similiar but not exactly the same.

0 votes
salvatore Aug 25, 2015

Did you mean to resize image after PDF processing? Do I need another 3rd party toolits to help with it? Any suggestion will be appreciated. Thanks in advance.

 

 

 

Best regards,

Salvatore

-------------------------------------

Tags: resize image

Steffen Heller Aug 25, 2015

No, I was talking about something else.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence CVEs and common questions

Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...

893 views 0 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you