Hello,
I am doing some test with absolute positioning inside relative divs. Something like this
<div id="outer" style="position:relative; height: 100px;" >
outer div 1
<div id="inner-1" style="position:absolute; top:0; left:0"> inner-1 <img src="test.jpg"> </div>
<div id="inner-2" style="position:absolute; top:0; left:0"> inner-2 </div>
</div>
<div id="outer" style="position:relative; height: 100px;">
outer div 2
<div id="inner-1" style="position:absolute; top:0; left:0"> inner-1 <img src="test.jpg"> </div>
<div id="inner-2" style="position:absolute; top:0; left:0"> inner-2 </div>
</div>
On the HTML each div is rendered one after the other and the inner divs are displayed INSIDE their outer divs.
Here is the sample html source code that I am trying to render with pd4ml.
[attachment=C:\pd4ml.jpg][/attachment]
Code:
<html>
<head>
<style type="text/css">
h2 {
page-break-after: always;
}
</style>
<jsp:include page="../../includes/head.jsp" />
</head>
<body>
<center>
<div style=" background-color: aqua; width:100px; border-color: black; height:150px; border-width: 3px; border-style: solid;" >
<div style="background-color: green; ">CONTRACHEQUE 1</div>
<div style="position: relative; border-color: red; border-width: 3px; border-style: solid;">
<div style=" position: absolute; left: 0; top: 0; border-color: maroon; border-width: 3px; border-style: solid;">
div absolute da imagem
</div>
<div style="background-color: BLUE; position: absolute; left: 0; top: 0; border-color: yellow; border-width: 3px; border-style: solid;">
<div id="destinatario" class="destinatario" >
<p class="textoVerso">MARCOS URATA</p>
<p class="textoVerso">ENDERECO</p>
</div>
</div>
</div>
</div>
<h2> </h2>
<div style=" margin-top:5px; background-color: black; width:100px; height:150px; border-color: green; border-width: 3px; border-style: solid;">
<div style="background-color: yellow; ">CONTRACHEQUE 2</div>
<div style="position: relative; border-color: red; border-width: 3px; border-style: solid;">
<div style=" position: absolute; left: 0; top: 0; border-color: maroon; border-width: 3px; border-style: solid;">
div absolute da imagem
</div>
<div style="background-color: yellow; position: absolute; left: 0; top: 0;border-color: yellow; border-width: 3px; border-style: solid;">
<div id="destinatario" class="destinatario" >
<p class="textoVerso">MARCOS URATA</p>
<p class="textoVerso">ENDERECO</p>
</div>
</div>
</div>
</div>
<h2> </h2>
<div style="margin-top:5px; background-color: lime; width:100px; height:150px; border-color:fuchsia; border-width: 3px; border-style: solid;">
<div style="background-color: silver; ">CONTRACHEQUE 3</div>
<div style="position: relative; border-color: red; border-width: 3px; border-style: solid;">
<div style=" position: absolute; left: 0; top: 0; border-color: maroon; border-width: 3px; border-style: solid;">
div absolute da imagem
</div>
<div style="background-color: silver; position: absolute; left: 0; top: 0; border-color: yellow; border-width: 3px; border-style: solid;">
<div id="destinatario" class="destinatario" >
<p class="textoVerso">MARCOS URATA</p>
<p class="textoVerso">ENDERECO</p>
</div>
</div>
</div>
</div>
</center>
</body>
</html>
And the resulting pdf generated by pd4ml:
[attachment=C:\pd4ml.pdf][/attachment]