Closed tomglx closed 6 months ago
@tomglx I had no problems at all displaying the attached PDF file (with the integrated PDF readers of Google Chrome 120.0.6099.62 and Firefox 118.0.1). Only some parts of the file are blacked out, presumably for privacy reasons.
Did you perhaps upload a different file by mistake?
That's exactly right. But you've also discovered another problem. The internal readers can display it, the standalone readers not. Like Acrobat Reader, FoxIT Reader and even okular cannot. The blacked out parts are another problem, no privacy measure. If I comment out the Background Properties in PDF/Ticket.pm, they become visible again. The uploaded file is no mistake.
Am Fr., 8. Dez. 2023 um 12:40 Uhr schrieb Kai Herlemann < @.***>:
@tomglx https://github.com/tomglx I had no problems at all displaying the attached PDF file (with the integrated PDF readers of Google Chrome 120.0.6099.62 and Firefox 118.0.1). Only some parts of the file are blacked out, presumably for privacy reasons.
Did you perhaps upload a different file by mistake?
— Reply to this email directly, view it on GitHub https://github.com/znuny/Znuny/issues/521#issuecomment-1847034653, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMN5UTHUKGM3FCLFL2OV5TYIL4DZAVCNFSM6AAAAABAK4WVV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBXGAZTINRVGM . You are receiving this because you were mentioned.Message ID: @.***>
@tomglx How did you installed the PDF::API2 version you've tried? And what were their file locations?
I've realized znuny comes with it's own PDF::API2 Version 2.033. So I've tried already by uninstalling the OS RPM. Also I removed it from the cpan-lib directory, so that the newer OS RPM 2.044 was used. No difference. Seems that the root cause remains in the introduction of perl 5.38.
Roy Kaldung @.***> schrieb am Sa., 9. Dez. 2023, 08:45:
@tomglx https://github.com/tomglx How did you installed the PDF::API2 version you've tried? And what were their file locations?
— Reply to this email directly, view it on GitHub https://github.com/znuny/Znuny/issues/521#issuecomment-1848295263, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMN5UQM57CTHLNDCRKOASTYIQJIVAVCNFSM6AAAAABAK4WVV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGI4TKMRWGM . You are receiving this because you were mentioned.Message ID: @.***>
I suppose that I've solved my problem. The LANG=de_DE.utf8 environment variable was set in the Apache Webserver systemd service. The perl 5.38 interpreter acts on this as if LC_NUMERIC is set to the same value. This behaviour was introduced in this version. But according to the docs, it requires "use locale" also to be set. I couldn't find any occurrence of this in the znuny sources. Regardless of this, the interpreter assumes that a comma is the decimal separator. This results in many wrong calculations in and for PDF::API2. And for the znuny layout too. Looks like a perl bug for me. I removed the LANG setting from the systemd service. This change made all working again.
@tomglx thank you for sharing, we'll close this issue then. I assume you changed the systemd file on your own and it's not default?
Yes, I did.
Am Di., 12. Dez. 2023 um 13:25 Uhr schrieb Roy Kaldung < @.***>:
@tomglx https://github.com/tomglx thank you for sharing, we'll close this issue then. I assume you changed the systemd file on your own and it's not default?
— Reply to this email directly, view it on GitHub https://github.com/znuny/Znuny/issues/521#issuecomment-1851938492, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMN5UV4CA5CEMT3CKYKLXTYJBENBAVCNFSM6AAAAABAK4WVV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRHEZTQNBZGI . You are receiving this because you were mentioned.Message ID: @.***>
Environment
Expected behavior
When printing a ticket, a correct displayable PDF is produced.
Actual behavior
When printing a ticket, a PDF file is produced, but cannot be displayed by any viewer. The PDF code seems to be corrupt. The PDF header at the start of the document seems to be correct.
How to reproduce
Steps to reproduce the behavior:
Additional information
What I've tried so far. With no improvement.
Screenshots
Message from Adobe Reader
A corrupt PDF file
Ticket_10431106_2023-12-07_11 59.pdf