I don't quite understand. You're saying it prints properly if you type that command right into the terminal?mikosiko wrote:if you mean the command than I'm using it print the file perfectly (silent No GUI)... same if I use AcroRead32 or NitroPdf or any other pdf viewerJonah Bron wrote:What happens when you just run it right from the terminal?
Massive PDF's file printing
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Massive PDF's file printing
Re: Massive PDF's file printing
Sounds like permission issues ...
There are 10 types of people in this world, those who understand binary and those who don't
Re: Massive PDF's file printing
was just going to say that. bet the user for the apache process doesn't have the same permissions as the exe. now this is a much more common thing to happen in linux than windows so could easily not be that. but its worth a look.VladSun wrote:Sounds like permission issues ...
Re: Massive PDF's file printing
YesJonah Bron wrote: ...
I don't quite understand. You're saying it prints properly if you type that command right into the terminal?
Re: Massive PDF's file printing
In windows? ... any kind that you are aware of? (I'm working with and account with administrative privileges)VladSun wrote:Sounds like permission issues ...
Re: Massive PDF's file printing
But apache, most likely, works under different account like NETWORK SERVICE. You can check what account is used by the program via task manager.mikosiko wrote:(I'm working with and account with administrative privileges)
Re: Massive PDF's file printing
I did check that too Weirdan... Apache is running as a windows service with "Logon As"=Local System... in task manager the httpd process shows as running under the "SYSTEM" username.Weirdan wrote: But apache, most likely, works under different account like NETWORK SERVICE. You can check what account is used by the program via task manager.
I'm lacking of more ideas at this point... maybe is time to just look for a different solution
Re: Massive PDF's file printing
Here's an idea to try to nail down where the problem is coming from...
Try executing a different windows process with the same code. For example, rather than printing, try opening the calculator or something. If it works, then you don't have a permissions issue, you have a printing issue.
But just for kicks, try giving the apache service administrator rights. Just don't leave it like that.
what if you created a batch file that would execute if from the command prompt and then use exec() to execute the batch file? It's a bit kludgy but it might work.
Try executing a different windows process with the same code. For example, rather than printing, try opening the calculator or something. If it works, then you don't have a permissions issue, you have a printing issue.
But just for kicks, try giving the apache service administrator rights. Just don't leave it like that.
what if you created a batch file that would execute if from the command prompt and then use exec() to execute the batch file? It's a bit kludgy but it might work.
[SOLVED] Massive PDF's file printing
thank you for the suggestions Jake... I had tried all of them already... same results every time.. I'm definitely inclined to the permits issue too but I'm failing to detect where and how to solve it.
... I'm just calling the week off in this one
maybe a good week end rest, plus a couple rounds of golf hitting that little freaking ball will give me some new ideas 
EDIT SOLVED: Well seems that thinking in the week-end golf round made the trick!!
I found the solution... was not a permit issue after all (but definitely is something to have in mind)... what is was that when exec() (or shell_exec or backtick) was executing the PDFXchange.exe it was not recognizing the default printer as existent, therefore the solutions was to write this line:
in this way:
Note: I did test with a local printer and also with a network printer (using FQN), both work perfectly.
Thanks everyone's suggestions... they definitely helped... specially the one mentioning "printing issue"
EDIT SOLVED: Well seems that thinking in the week-end golf round made the trick!!
Code: Select all
$printcmd = `PDFXCHANGE.exe /print $file`;Code: Select all
$printer = "thename of the printer here";
$printcmd = `PDFXCHANGE.exe /print:printer=\"$printer\" $file`;Thanks everyone's suggestions... they definitely helped... specially the one mentioning "printing issue"