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 0b00016
Show file tree
Hide file tree
Showing 173 changed files with 308 additions and 204 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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions tests/TestData/HtmlOutput/qr-full-set.svg.scissors.html

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions tests/TestData/HtmlOutput/qr-full-set.svg.scissorsdown.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion tests/TestData/HtmlOutput/qr-full-set.svg.textarrows.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions tests/TestData/HtmlOutput/qr-minimal-setup.svg.scissors.html

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions tests/TestData/HtmlOutput/qr-minimal-setup.svg.scissorsdown.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions tests/TestData/HtmlOutput/qr-ultimate-debtor.svg.scissors.html

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions tests/TestData/HtmlOutput/qr-ultimate-debtor.svg.scissorsdown.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file modified tests/TestData/TcPdfOutput/qr-additional-information.svg.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/TcPdfOutput/qr-alternative-schemes.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-alternative-schemes.svg.print.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-full-set.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 modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.scissors.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-minimal-setup.svg.scissorsdown.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-payment-reference-non.svg.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/TcPdfOutput/qr-payment-reference-scor.svg.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/TcPdfOutput/qr-ultimate-debtor.svg.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.print.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.scissors.pdf
Binary file not shown.
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-ultimate-debtor.svg.textarrows.pdf
Binary file not shown.
Binary file modified tests/TestData/TcPdfOutput/qr-utf8.svg.pdf
Binary file not shown.

0 comments on commit 0b00016

Please sign in to comment.