Skip to content

Commit

Permalink
Fix height of receipt in html with scissors
Browse files Browse the repository at this point in the history
  • Loading branch information
sprain committed Nov 7, 2024
1 parent d831d42 commit f5aca5a
Show file tree
Hide file tree
Showing 173 changed files with 269 additions and 165 deletions.
6 changes: 3 additions & 3 deletions src/PaymentPart/Output/HtmlOutput/HtmlOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ private function hideSeparatorContentIfPrintable(string $paymentPart): string
$printableStyles = PrintableStylesTemplate::TEMPLATE_SCISSORS;
if ($layout->isPositionScissorsAtBottom()) {
// draw vertical scissors at bottom
$printableStyles .= PrintableStylesTemplate::TEMPLATE_VERTICAL_SCISSORS_DOWN;
$printableStyles .= PHP_EOL.PHP_EOL. PrintableStylesTemplate::TEMPLATE_VERTICAL_SCISSORS_DOWN;
}
}

if (!$layout->isDisplayText()) {
// hide text
$printableStyles .= PrintableStylesTemplate::TEMPLATE_HIDE_TEXT;
$printableStyles .= PHP_EOL.PHP_EOL. PrintableStylesTemplate::TEMPLATE_HIDE_TEXT;
} elseif ($layout->isDisplayTextDownArrows()) {
// text not hidden and draw text arrows
$printableStyles .= PrintableStylesTemplate::TEMPLATE_TEXT_DOWN_ARROWS;
$printableStyles .= PHP_EOL.PHP_EOL. PrintableStylesTemplate::TEMPLATE_TEXT_DOWN_ARROWS;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class PrintableStylesTemplate
transform: rotate(90deg);
display: inline-block;
content: '\\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
top: 12.5mm;
left: 61.1mm;
}
EOT;

Expand All @@ -51,10 +51,10 @@ class PrintableStylesTemplate
transform: rotate(-90deg);
display: inline-block;
content: '\\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
top: 91.8mm;
left: 61.7mm;
}
EOT;

Expand Down
Binary file modified tests/TestData/FpdfOutput/qr-additional-information.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-additional-information.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-additional-information.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-alternative-schemes.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-alternative-schemes.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-alternative-schemes.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-full-set.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-full-set.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-full-set.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-full-set.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-full-set.svg.textarrows.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-international-ultimate-debtor.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-minimal-setup.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-minimal-setup.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-minimal-setup.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-minimal-setup.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-minimal-setup.svg.textarrows.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-information-zero-amount.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-non.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-non.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-non.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-scor.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-scor.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-payment-reference-scor.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-ultimate-debtor.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-ultimate-debtor.print.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-ultimate-debtor.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-ultimate-debtor.svg.textarrows.pdf
Binary file not shown.
Binary file modified tests/TestData/FpdfOutput/qr-utf8.svg.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
margin-top: -11pt;
}



#qr-bill-separate-info-text:before {
display: inline-block;
content: '\25BC \25BC \25BC';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
margin-top: -11pt;
}



#qr-bill-separate-info-text:before {
display: inline-block;
content: '\25BC \25BC \25BC';
Expand Down
10 changes: 6 additions & 4 deletions tests/TestData/HtmlOutput/qr-full-set.svg.scissors.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
20 changes: 12 additions & 8 deletions tests/TestData/HtmlOutput/qr-full-set.svg.scissorsdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
2 changes: 2 additions & 0 deletions tests/TestData/HtmlOutput/qr-full-set.svg.textarrows.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
margin-top: -11pt;
}



#qr-bill-separate-info-text:before {
display: inline-block;
content: '\25BC \25BC \25BC';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
margin-top: -11pt;
}



#qr-bill-separate-info-text:before {
display: inline-block;
content: '\25BC \25BC \25BC';
Expand Down
10 changes: 6 additions & 4 deletions tests/TestData/HtmlOutput/qr-minimal-setup.svg.scissors.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
20 changes: 12 additions & 8 deletions tests/TestData/HtmlOutput/qr-minimal-setup.svg.scissorsdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
margin-top: -11pt;
}



#qr-bill-separate-info-text:before {
display: inline-block;
content: '\25BC \25BC \25BC';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,13 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-separate-info-text {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,23 @@
transform: rotate(90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -95mm;
left: 54.2mm;
}#qr-bill-receipt:after {
top: 12.5mm;
left: 61.1mm;
}

#qr-bill-receipt:after {
transform: rotate(-90deg);
display: inline-block;
content: '\2702';
position: relative;
position: fixed;
font-size: 16pt;
top: -15mm;
left: 54.7mm;
}#qr-bill-separate-info-text {
top: 91.8mm;
left: 61.7mm;
}

#qr-bill-separate-info-text {
display: none;
}
</style>
Expand Down
Loading

0 comments on commit f5aca5a

Please sign in to comment.