unable to use absolute positioning on images inside cfdocument from cfsavecontent

Description

Lucee 5.2.1.9 (not 5.2.1.5)

The following test illustrates the problem as simply as possible. Attempting to use css to position a div absolutely in which the css class was assigned within a cfsavecontent tag outside of the cfdocument tag will cause the image to not render at all within the cfdocument.

<cfset filename = "/var/site/logo.png"> <cfsavecontent variable="saveddiv"> <div class="saveddivclass"> <img src="file://#label#"> </div> </cfsavecontent> <cfdocument format="PDF" filename="output.pdf" fontEmbed="yes" pageType="legal" marginBottom = ".2" marginLeft = ".2" marginRight = ".2" localurl="yes" > <style> .absoluteClass{ position:absolute; top:0px; left:0px; } .saveddivclass{ position:absolute; top:20px; left:20px; } </style> <cfoutput> <div class="absoluteClass"> <img src="file://#label#"> </div> #saveddiv# </cfoutput> </cfdocument>

Environment

Linux (4.9.27-14.31.amzn1.x86_64) 64bit
A4.large

Attachments

4
  • 02 Jun 2017, 12:39 pm
  • 02 Jun 2017, 12:39 pm
  • 02 Jun 2017, 12:38 pm
  • 01 Jun 2017, 01:43 pm

Activity

Show:

Pothys - MitrahSoft 27 August 2021 at 11:47
Edited

This issue was solved from pdf version 1.0.0.70-SNAPSHOT onwards by the implementation of a modern pdf enginehttps://luceeserver.atlassian.net/browse/LDEV-1849. . Could you please check with the latest pdf version?

But in classic engine still issue persists.

greg hinderliter 4 May 2021 at 19:15

unable to verify, we have some things currently blocking our ability to upgrade. Will update when this changes.

Pothys - MitrahSoft 30 April 2021 at 15:19

I hope this issue was solved from the lucee latest version 5.3.1.91 onwards. Can you please check with the latest version?

Geoff Bowers 22 May 2018 at 03:34

It is allowed. But absolute positioning in a `<td>` is a bit buggy, because it needs `<td>` to be `position: relative;` and that is not consistent in different browsers, but this shouldn't be a problem if we are only targeting the latest versions of major browsers.

No idea what the underlying rendering engine is for either 4.5 or 5.2 but its probably not "modern".

A solution might be to absolute position the div against a div in the td:

<td> <div style="position: relative;"> <div style="position: absolute;"> ...

Pothys - MitrahSoft 2 June 2017 at 12:43
Edited

I've analyzed this ticket a lot and confirmed the issue happened in 5.2.1.9 version. If we use div content within the td tag in cfsaveconent, makes div content disappear while we used inside cfdocument. Without the td tag, It's working fine . In lucee 4.5 version working as expected. I've attached Zip file and PDF 4.5 , 5.2.1.9 .

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 31 May 2017 at 22:38
Updated 27 August 2021 at 11:48

Flag notifications