c# - PDF is not printing from Windows XP, but works on Windows 7 -
the following code prints on windows 7, won't work on windows xp. both computers have default printer setup works correctly if go notepad , manually print document. on windows xp box sits there, no errors no nothing.
how can debug error message or other way figure out why isn't printing?
try { if (file.exists(pdfpath)) { process process = new process(); process.startinfo.filename = pdfpath; process.startinfo.verb = "print"; process.startinfo.createnowindow = true; process.start(); process.waitforinputidle(); process.kill(); } else { messagebox.show("the file \"" + pdfpath + "\" not exist", "file not found", messageboxbuttons.ok, messageboxicon.error); statuslabel.text = ""; return; } } catch (exception e) { messagebox.show(e.message, "unable print packing slip", messageboxbuttons.ok, messageboxicon.error); return false; }
i thing have differently settings pdf print in both systems.
check "print" verb .pdf filetypes .. in winxp , win7. same results?
for check , compare can use software: nirsoft-file_types_manager
maybe link this:
print
"c:\program files (x86)\foxit software\foxit reader\foxit reader.exe" /p "%1"
as solution propose following steps:
check "print" verb pdf in system. if verb missing, reinstal pdf software.
if differently commands try use same software in both systems. software nirsoft can try edit xp command fix (this can in system if "incorrectly" uninstalled software pdf .. if know path parameters can try edit command
try use "open" verb if software opening (and printing) pdf files installed correctly. if work , print no, try reinstal software pdf.
if of steps not help, commands same , open file work correctly, can try use command print pdf directly, check if command working.
- in winxp replace %1 filename , run command in run window (start shortcut win + r) warning: file printed if works
if not works, reinstal pdf software. if works command line, not software, not know how you.
Comments
Post a Comment