How to call pdfprint.exe to print PDF files to Windows Printer from PHP source code? How to print PDF files from a web based app?

Hello,

I am testing your pdf print app for a web based app. I am hoping to use it to print PDF files in a background process on a web server via a shell_exec command from PHP. The problem is, your trial app requires user data entry so I am unable to confirm that it works in my environment. I'd rather not spend the money on the app until I know it works as I need it to. Is there any chance of getting a trial version that does not require a user response? Or is there a workaround of some sort?

Customer
--------------------------------------------------

icon256
We suggest you may run pdfprint.exe from CMD window by manual to try first, if you can use pdfprint.exe to print PDF file to Windows Printer in CMD window correctly, you will no problem to call pdfprint.exe to print PDF file from PHP code.

If you still can't call it from PHP code to print PDF file correctly, it may caused by permission problem, you can use "VeryPDFComRunCmd COM Component" to run pdfprint.exe from administrator user account, this will avoid the permission restrictions.

Please look at more information about "VeryPDFComRunCmd COM Component" from following web page,

http://www.verydoc.com/exeshell.html#VeryPDFComRunCmd_COM_Component

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

The following is the PHP example to call pdfprint.exe application,

<?php

$strInFile = "D:\\VeryPDF\\test.pdf";
$strLicenseKey = "-$ XXXX-XXXX-XXXX-XXXX";
$strCmd = "D:\\VeryPDF\\pdfprint.exe $strLicenseKey \"$strInFile\"";

echo $strCmd . "\n";

$comobj = new COM("VeryPDFCom.RunCmd") or die("Couldn't create the COM Component");
$strCmd = $comobj->RunCmd2($strCmd, 5);
echo("Output is:\r\n" . $strCmd);

?>

You can set "VeryPDFCom.RunCmd" to run inside administrator user account, please look at more information from following web page,

http://www.verydoc.com/blog/verydoc-release-notes-verydoc-releases-an-exe-com-of-verypdfcomruncmd-exe-today-verypdf-exe-com-does-allow-you-to-call-ms-office-and-any-exe-application-from-asp-php-c-net-etc-program-languag.html

VeryPDF

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

This entry was posted in PDF Print and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!