Question from Customer:
Hi all,
Hope someone can help me out on this one. I read in another VeryPDF post that this error has been known to happen on Windows 2008 Server x64 and not so much on Windows 2003 server. I am running this on a Windows 2003 server SP 2 and I have confirmed that the directory 'C:\Windows\System32\config\systemprofile\Desktop' exists. So, what else could cause this problem?
https://www.verypdf.com/app/pdf-print-cmd/index.html
Here is the exact code that I am running (it is in C#) to invoke the pdfprint executable:
var psi = new ProcessStartInfo(printExe, args) { ErrorDialog = false, WindowStyle = ProcessWindowStyle.Hidden, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true, Domain = ConfigurationManager.AppSettings["DomainName"], UserName = ConfigurationManager.AppSettings["UserName"], Password = secPass, }; var pdfPrint = Process.Start(psi); if (pdfPrint == null) { throw new ArgumentException("Failed to start Process."); }
This code looks like it should invoke the pdfprint executable without issue. I am at a loss.
I am logging out the exit code, and it states that it exits with the code: 128
Any help on this issue is greatly appreciated.
Thanks!
Reply from VeryPDF:
Hello,
Thank you for your query. The issue you're experiencing seems related to permission restrictions in the default Local System User Account on your system. We recommend trying to use CmdAsUser.exe to run pdfprint.exe from an interactive user account, which should resolve the issue.
Here are the steps you can follow to resolve the problem:
1. Test PDFPrint in CMD:
First, ensure that pdfprint.exe can be executed manually via the Command Prompt (CMD).
- Open a Command Prompt window.
- Navigate to the folder where pdfprint.exe is located.
- Run the following command to print your PDF:
pdfprint.exe C:\verypdf\test.pdf
If pdfprint.exe runs correctly from the CMD window, it indicates that the user account you’re currently using (likely "Administrator") has proper permissions.
2. Download CmdAsUser.exe:
To resolve the issue, download CmdAsUser.exe from the following links:
After downloading, unzip the file to a folder (e.g., C:\verypdf).
3. Run PdfPrint via CmdAsUser:
Once you have CmdAsUser.exe set up, you can use it to run pdfprint.exe under the desired user account. Use the following command line:
CmdAsUser.exe Administrator . /p password /c "C:\verypdf\pdfprint.exe" -printer "192.168.1.10VeryPDFPrinter" C:\verypdf\test.pdf
In most systems, you may encounter error #1314, which indicates insufficient permission to switch the user account. If this occurs, please follow the instructions on the page below to solve the #1314 permission problem:
Once you’ve resolved the permission issue, you should be able to successfully launch pdfprint.exe via CmdAsUser.exe.
4. Update C# Code:
Finally, to invoke pdfprint.exe from your C# application, use CmdAsUser.exe instead of pdfprint.exe directly. Modify your C# code as follows:
printExe = "C:\\verypdf\\cmdasuser.exe"; args = "Administrator . /p password /c \"C:\\verypdf\\pdfprint.exe\" -printer \"192.168.1.10VeryPDFPrinter\" C:\\verypdf\\test.pdf"; var psi = new ProcessStartInfo(printExe, args) { ErrorDialog = false, WindowStyle = ProcessWindowStyle.Hidden, UseShellExecute = false, RedirectStandardError = true, RedirectStandardOutput = true, Domain = ConfigurationManager.AppSettings["DomainName"], UserName = ConfigurationManager.AppSettings["UserName"], Password = secPass, }; var pdfPrint = Process.Start(psi); if (pdfPrint == null) { throw new ArgumentException("Failed to start Process."); }
This should resolve your problem and allow you to print PDFs from your C# code.
If you continue to experience issues or need further assistance, please feel free to contact us via email at support@verypdf.com. We will be happy to help resolve any remaining challenges.
Introducing VeryPDF Cloud API Platform
The VeryPDF Cloud API Platform is a powerful, scalable solution designed to provide seamless integration for businesses and developers looking to leverage advanced PDF processing functions without the need for complex local installations or system dependencies. With the Cloud API, users can easily automate PDF tasks like conversion, extraction, watermarking, and much more, all from within their web applications.
https://www.verypdf.com/online/cloud-api/index.html
Here’s why the VeryPDF Cloud API Platform stands out:
Key Advantages of VeryPDF Cloud API Platform
-
Over 100 Functions for PDF Processing:
The platform offers a comprehensive suite of over 100 different functions that allow you to manage and manipulate PDF documents in virtually any way you need. Whether you're converting PDFs to different formats, extracting content, splitting/merging documents, adding security features, or handling OCR tasks, VeryPDF Cloud API has you covered. -
Easy Integration:
One of the biggest benefits of using the VeryPDF Cloud API is its easy integration process. The API can be quickly added to your existing web applications without requiring complex setups or dependencies on your local system configuration. This means no worrying about compatibility or system-specific requirements. -
Scalable and Flexible:
The cloud-based nature of the API ensures that you can scale your operations effortlessly. As your business grows, the platform can handle an increasing number of PDF requests without requiring additional server resources or infrastructure changes. This makes it an excellent choice for businesses of all sizes. -
No System Configuration Dependencies:
Unlike traditional software that may require specific system setups or configurations, VeryPDF Cloud API works independent of your system environment. This allows for greater flexibility and ensures that the platform can be accessed and used from virtually any system without requiring system-specific configurations. -
Cost-Effective:
With a pay-as-you-go pricing model, the VeryPDF Cloud API Platform allows businesses to save costs on infrastructure and software maintenance. You can scale up or down based on your usage, ensuring that you're only paying for what you need. -
Reliable Performance:
VeryPDF Cloud API Platform is designed for high performance and reliability. With robust cloud infrastructure, you can count on consistent uptime and fast processing speeds, even when handling large volumes of requests or complex PDF operations. -
Enhanced Security Features:
When it comes to document processing, security is always a concern. VeryPDF Cloud API offers advanced security features like encryption, access controls, and secure document handling, ensuring that your PDFs are always protected during processing. -
Continuous Updates and Improvements:
By subscribing to the VeryPDF Cloud API, you benefit from continuous updates and improvements to the API. As new features are added and enhancements are made, you’ll have access to the latest capabilities without having to worry about manual updates or system maintenance. -
Global Accessibility:
The cloud-based nature of the platform means that you can access the API from anywhere in the world, without limitations related to local hardware or software configurations. This makes it easy for distributed teams or businesses with global customers to use the platform. -
Support for Multiple File Formats:
VeryPDF Cloud API not only handles PDFs but also supports various other formats for conversion, such as images, text, and office document formats. This cross-format functionality enables you to streamline various tasks from one platform.
Why Should You Choose VeryPDF Cloud API Platform?
-
Simplifies Complex PDF Tasks:
If you need to automate complex PDF tasks in your business workflows, the VeryPDF Cloud API offers an easy way to integrate PDF management features without requiring in-depth technical knowledge. This means you can focus more on your core business while leveraging advanced PDF processing power. -
No Local Setup Required:
Traditional PDF tools often require installation on specific servers or systems. With the cloud-based API, you don’t have to worry about local setup or managing system-specific requirements. Simply integrate it into your web application and start processing documents immediately. -
Faster Development Time:
With its easy-to-use documentation and simple integration, developers can reduce the time spent on PDF-related tasks. You can integrate PDF processing into your web applications quickly, allowing you to focus on the user experience and business goals instead of maintaining a complex PDF system. -
Maximize Efficiency:
Whether you’re processing single documents or handling large volumes of PDFs, the VeryPDF Cloud API ensures that tasks are completed efficiently and with minimal manual effort. The API handles the heavy lifting, so your team doesn’t have to. -
Future-Proof Technology:
As a cloud-based service, VeryPDF Cloud API is always evolving. New features and enhancements are continuously added to ensure you have access to the latest and most efficient PDF processing tools. This ensures that you stay ahead in the competitive landscape of digital document management.
Conclusion
The VeryPDF Cloud API Platform offers unmatched flexibility, scalability, and ease of integration. With a comprehensive set of over 100 functions for PDF processing, it empowers businesses to streamline their workflows, improve productivity, and reduce the cost of managing documents. Whether you're a developer looking to integrate PDF processing into your web application or a business that needs powerful document solutions, VeryPDF Cloud API is the ideal choice.
To explore the full range of features and start leveraging the power of the VeryPDF Cloud API Platform, visit VeryPDF Cloud API Platform.
Choose VeryPDF Cloud API to unlock the full potential of your PDF processing needs—efficiently, securely, and cost-effectively.
For any further assistance, feel free to contact us! Visit our support page.