Send file to printer in D language ( windows ) -


i searched internet, somehow sending documents (txt) printer, not found, how can send txt files printer using d language?

like ratchet freak said in comment, same way in c, if search printing text files on windows , find c example, can in d too. if struct or win32 function not available, can add extern(windows) , function signature. know can use printer other graphics device gdi functions, seems harder should be, idk if there's easier way through win32 api though.

one option: i'm not on windows box right now, i'm pretty sure command print through shell works on text files , might easiest way. use std.file.write write string text file, std.process.executeshell call print command on file.

http://dlang.org/phobos/std_process.html#.executeshell

calling shell command might feel hackish, hey if gets job done.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -