renderCustom($matrix, $style, false); echo "Generated SVG with matching parameters:\n"; echo " Module size: 20px\n"; echo " Quiet zone: 4 modules (80px)\n"; echo " Canvas size should be: " . (21 * 20 + 2 * 80) . "x" . (21 * 20 + 2 * 80) . "\n"; echo " SVG length: " . strlen($svg) . " bytes\n\n"; // Check actual canvas size if (preg_match('/width="(\d+)" height="(\d+)"/', $svg, $matches)) { echo "Actual canvas size: {$matches[1]}x{$matches[2]}\n"; $expectedSize = 21 * 20 + 2 * 80; // 580 if ((int)$matches[1] === $expectedSize && (int)$matches[2] === $expectedSize) { echo "āœ… Canvas size matches!\n"; } else { echo "āŒ Canvas size doesn't match (expected: {$expectedSize}x{$expectedSize})\n"; } } // Save to file $outputDir = __DIR__ . '/test-qrcodes'; $filepath = $outputDir . '/hello-world-correct-params.svg'; file_put_contents($filepath, $svg); echo "\nāœ… Saved: {$filepath}\n"; echo "This should match the parameters of the problematic SVG.\n"; echo "Compare this with the problematic SVG to find differences.\n";