2020-06-29 00:28:32 +02:00
|
|
|
[{assign var="defaultPagePadding" value=","|explode:"45,15,25,25"}] [{* top, right, bottom, left *}]
|
2020-06-13 22:43:57 +02:00
|
|
|
[{assign var="pagePadding" value=$pagePadding|default:$defaultPagePadding}]
|
|
|
|
|
|
|
|
[{* rulers *}]
|
|
|
|
[{* include file="d3pdfrulers.tpl" pagePadding=$pagePadding *}]
|
|
|
|
|
|
|
|
<style type="text/css">
|
|
|
|
.rulerItemHorizontal {
|
|
|
|
position: absolute;
|
2020-06-29 00:28:32 +02:00
|
|
|
top: -[{$pagePadding.0}]mm;
|
2020-06-13 22:43:57 +02:00
|
|
|
width: 0;
|
|
|
|
height: 7px;
|
|
|
|
color: blue;
|
|
|
|
border-left: 1px solid blue
|
|
|
|
}
|
|
|
|
|
|
|
|
.rulerItemVertical {
|
|
|
|
position: absolute;
|
|
|
|
left: -[{$pagePadding.3}]mm;
|
|
|
|
width: 7px;
|
|
|
|
height: 0;
|
|
|
|
color: blue;
|
|
|
|
border-top: 1px solid blue
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
[{* horizontal *}]
|
|
|
|
[{section name=rulerItemsHorizontal start=10 step=10 loop=600}]
|
|
|
|
<div class="rulerItemHorizontal" style="left: [{math equation="left - padding" left=$smarty.section.rulerItemsHorizontal.index padding=$pagePadding.3}]mm">
|
|
|
|
[{$smarty.section.rulerItemsHorizontal.index}]
|
|
|
|
</div>
|
|
|
|
[{/section}]
|
|
|
|
|
|
|
|
[{* vertical *}]
|
|
|
|
[{section name=rulerItemsVertical start=0 step=10 loop=600}]
|
2020-06-29 00:28:32 +02:00
|
|
|
<div class="rulerItemVertical" style="top: [{math equation="top - padding" top=$smarty.section.rulerItemsVertical.index padding=$pagePadding.0}]mm">
|
|
|
|
[{$smarty.section.rulerItemsVertical.index}]
|
|
|
|
</div>
|
2020-06-13 22:43:57 +02:00
|
|
|
[{/section}]
|
|
|
|
|
|
|
|
|