Closed merlincom closed 1 year ago
Second problem: The loop for($i=1;$i<=40;$i++)
on the second page ends with $i = 29 on page two. No more pages (three and more) are created. The PHP code is correct and works analogously to the example http://www.fpdf.org/en/tutorial/tuto2.htm.
YES. I have taken into maind that the examples in FpdF are written with
$pdf->
and in the code of sprain / php-swiss-qr-bill](sprain / with $fpdf->
This is an FPDF question and not directly concerning this library. Therefore this is out of the scope of support we can provide here, sorry!
Ich bin mit diesem Entscheid nicht einverstanden, denn das Problem taucht erst auf, wenn use Sprain\SwissQrBill as QrBill; verwendet wird. Ganz offensichtlich verhindert das Script, dass fpdf->'Schreib irgendas sehr langes' Ausgaben über mehrer A4-Seiten hinweg geschrieben werden können. Im beigefügten Beispiel stoppt es bei der Zahl 29 am Ende einer A4-Seite, anstatt auf 40 hochzuzählen. Irgendwo im Sprain\SwissQrBill as QrBill muss ein Schalter gesetzt sein, der dies für alle nachfolgenden Seiten festlegt. Danke für's nochmalige drüberschauen.
I don't agree with this decision, because the problem only appears when use Sprain\SwissQrBill as QrBill; is used. Quite obviously, the script prevents fpdf->'Write anything very long' output from being written over several A4 pages. In the attached example, it stops at the number 29 at the end of an A4 page instead of counting up to 40. Somewhere in the Sprain\SwissQrBill as QrBill must be a switch that sets this for all subsequent pages. Thanks for looking over it again.
$fpdf->AddPage();
for($i=1;$i<=40;$i++) {
$fpdf->Cell(0,10,'Printing line number '.$i,0,1);
}
I don't agree with this decision …
Even if you don't agree: This library is provided as is, free of charge, without any implied entitlement to support or other services. The community provides support if they have the time and knowledge to do so. In this case, the use case is too specific regarding how FPDF behaves and I am simply not able to help you as I am not expert in this topic.
Please excuse. I did not mean to attack or even offend anyone. From my point of view it is a bug in the sprain / php-swiss-qr-bill and not a FPDF problem. But of course I accept that there is no claim for support and at the moment the knowledge to solve the problem is missing. I will therefore use my modest programming knowledge to search for clues.
it is a bug in the sprain/php-swiss-qr-bill
I suppose it's not a bug, but rather two approaches that are not yet adjusted to each other. Implementing the qr bill into a full pdf with more information needs to consider the full project setup and may require tweaks here and there. Therefore, the scope of knowledge needs to be much broader, considering factors outside of this library. That's why we reached the limits of the help we can provide here.
did not mean to attack or even offend anyone
No worries, there are no hard feelings. As a maintainer I just need to set boundaries sometimes to make clear, how far we can go and where you need to find help somewhere else. I hope you'll find your solution soon!
Hi @merlincom
In your case, a simple approach to resolve this is probably to generate PDFs for your Invoice and the QR-Bill separately, and then merge it? There seem to be a couple of packages for PDF merging, but I can't give any recommendations: https://packagist.org/?query=pdf%20merge
How do I add a header? The sample code on the [http://www.fpdf.org/en/doc/header.htm] website does not work like this. Thanks for a hint.
What works: Write the payment slip with the QR code in a PDF file and fill the first, the second and the following page with text, etc.