PhilterPaper / Perl-PDF-Builder

Extended version of the popular PDF::API2 Perl-based PDF library for creating, reading, and modifying PDF documents
https://www.catskilltech.com/FreeSW/product/PDF%2DBuilder/title/PDF%3A%3ABuilder/freeSW_full
Other
6 stars 7 forks source link

CTS 28 - PDF::Builder call from Web #118

Closed otrcomm closed 4 years ago

otrcomm commented 4 years ago

Hello All, This is my first time at this forum.

I have a perl script that uses PDF::Builder that I can run from the terminal as root no problem, however when I try to call that same program via browser under apache2, ... ... print FH "Inside select-signature.pl before PDF::Builder call\n" if $DEBUG > 0; my $pdf = PDF::Builder->new(-compress => $compress); print FH "Inside select-signature.pl after PDF::Builder call\n" if $DEBUG > 0; ... ... I can not get pass the my $pdf = PDF::Builder->new(-compress => $compress); statement. The first print statement works, but the second one never fires.

Like I said, running as root from the command line, the script works as planned.

Any ideas?

Thanks in advance, Murrah Boswell

otrcomm commented 4 years ago

I figured it out! Operator error in some respects. However, in other respects, some free ttf fonts downloaded from web cause .../Builder/Resource/CIDFont/TrueType/FontFile.pm to raise errors at line 347.

otrcomm commented 4 years ago

... removed those fonts and all works as planned.

PhilterPaper commented 4 years ago

If there are certain fonts which cause PDF::Builder to blow up, it would be good for me to know about them. Either they are defective and users should be warned against using them, or something needs fixing in PDF::Builder. It would be helpful to know some of these fonts and how you tried to use them, and what problems you had. Be sure to check that you didn't somehow corrupt the fonts when you downloaded them! If you didn't, they should work in, say, a browser. What OS are you using? Thank you for the information.

otrcomm commented 4 years ago

This turned out to be total operator error. The fonts that caused issues were chmoded 000 when I downloaded them so FontFile.pm could not read them. I just chmoded them to 644 and everything is okay. I guess when I was running as root from the terminal, FontFile.pm also ran as root and had not problems. However, since apache2 runs as www-data, it could not read them. But it is all ok now.

On Thu, May 21, 2020 at 6:01 AM Phil Perry notifications@github.com wrote:

If there are certain fonts which cause PDF::Builder to blow up, it would be good for me to know about them. Either they are defective and users should be warned against using them, or something needs fixing in PDF::Builder. It would be helpful to know some of these fonts and how you tried to use them, and what problems you had. Be sure to check that you didn't somehow corrupt the fonts when you downloaded them! If you didn't, they should work in, say, a browser. What OS are you using? Thank you for the information.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/PhilterPaper/Perl-PDF-Builder/issues/118#issuecomment-632072481, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOZM3BW5RSXYZIB7K32JNLRSUQ23ANCNFSM4NGFEUKA .

-- If you tell me, I'll forget. If you show me, I'll remember. if you involve me, I'll understand.

PhilterPaper commented 4 years ago

OK, I guess we all have "off" days. I'll close this.