Error loading file #5634
Replies: 2 comments 1 reply
-
|
your approach is wrong the simplest way is use a command line file (.cmd or .bat) as c# will mess the process up the way your calling. Firstly CMD prove that your not spacing a CMD call well and don't need anything more that "exit" is likely to look for a second filename as it indicates user dialog printing |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Your program is providing incorrect path: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
When running the following code, receive the error "Error loading \?\C:\Temp\RGrant Data\Basic learning project-print-to-defaultC:\Oasis Reports\Display John Doe Options.pdf"
It appears to add the location of the C# program that is calling SumartraPDF. The C# code being used is:
//
// Print the pdf file to the default printer
//
string pdfFilePath = "C:/Oasis Reports/Display " + textBox1.Text + " Options.pdf";
string arguments = $"-print-to-default"{pdfFilePath}" -exit-when-done";
ProcessStartInfo startInfo = new ProcessStartInfo
{
I also am attempting to have the pdf document printed without the user seeing the SumartraPDF window, but it appears.
Beta Was this translation helpful? Give feedback.
All reactions