Hello,
I wanted to print some images and I did not find any way to do so in XYplorer. Did I miss something ?
print files
-
highend
- Posts: 14954
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: print files
Code: Select all
$files = "<get SelectedItemsPathNames |>";
$printers = replace(regexmatches(runret("wmic path win32_printer get name /format:list"), "Name=.*?$", "|"), "Name=");
$printer = quote(popupmenu($printers, -1, -1, , , 0, "|"));
foreach($file, $files) {
$file = quote($file);
run "rundll32.exe %SystemRoot%\System32\shimgvw.dll,ImageView_PrintTo /pt $file $printer", "<curpath>", 0, 0;
}One of my scripts helped you out? Please donate via Paypal
-
lian00
- Posts: 429
- Joined: 09 Jul 2014 17:12
Re: print files
OK, thank you. Too bad it's not in the core. Will it work in 64 bits ?
Windows 10 64 bits
-
highend
- Posts: 14954
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: print files
Yeah, I'm using it on Windows Server 2012 R2 (x64)...
One of my scripts helped you out? Please donate via Paypal
-
lian00
- Posts: 429
- Joined: 09 Jul 2014 17:12
-
admin
- Site Admin
- Posts: 66361
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
lian00
- Posts: 429
- Joined: 09 Jul 2014 17:12
-
admin
- Site Admin
- Posts: 66361
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
lian00
- Posts: 429
- Joined: 09 Jul 2014 17:12
Re: print files
Well, as it's a very good image browser - I used XYplorer as image browser - this could be a nice feature. But if I'm fhe fist one asking for such a feature, I suppose there is not a lot of people interested in...admin wrote:It could. Not sure about the demand though.
Windows 10 64 bits
-
ColdNose
- Posts: 36
- Joined: 16 Jun 2017 09:21
- Location: Win11, 3 monitors: (1) 1920x1200 @ 125%, (2) 3840x2160 @ 175%
Re: print files
Highend, is there way to modify this to print any filetype (.pdf, .docx, etc.)? If not any filetypes, how about just .pdfs?highend wrote: ↑28 Aug 2015 18:44Code: Select all
$files = "<get SelectedItemsPathNames |>"; $printers = replace(regexmatches(runret("wmic path win32_printer get name /format:list"), "Name=.*?$", "|"), "Name="); $printer = quote(popupmenu($printers, -1, -1, , , 0, "|")); foreach($file, $files) { $file = quote($file); run "rundll32.exe %SystemRoot%\System32\shimgvw.dll,ImageView_PrintTo /pt $file $printer", "<curpath>", 0, 0; }
I think shimgvw.dll only works with image files, right?
-
jupe
- Posts: 3462
- Joined: 20 Oct 2017 21:14
- Location: Win10 22H2 120dpi
Re: print files
You definitely can't print PDFs with the above method, but if you use SumatraPDF you can print them via command line, I gave a small example how here:
viewtopic.php?t=19957#p166324
viewtopic.php?t=19957#p166324
XYplorer Beta Club