Answer the question
In order to leave comments, you need to log in
Is there an application with printing multi-page TIFF from the context menu?
Good day.
Is there software for editing and/or viewing multi-page TIFF files that registers itself as a print application, ie. so that when you click "print" from the context menu, the file would go to print immediately without additional settings windows (software calls ShellExecute (print) or whatever it is in WinAPI)?
This is necessary for the operation of one corporate application ... (Directum 5.4, transformation services)
Google did not give a clear answer. You can print an infraview, but it's paid for the corporate segment...
our friend mspaint can do this - but only the first page...
Can he code something tricky? You can offer recipes in C#.
Answer the question
In order to leave comments, you need to log in
The answer is simple. There is no application. But the problem is solved:
[HKEY_CLASSES_ROOT\.tif]
@="TIFImage.Document"
[HKEY_CLASSES_ROOT\.tiff]
@="TIFImage.Document"
[HKEY_CLASSES_ROOT\TIFImage.Document\shell\print\command]
@="\"C:\\Directum\ \print_tiff.cmd\" \"%1\""
@echo off
C:\Directum\ImageMagick\magick.exe convert -compress lzw -quality 85 "%1" "%1.tmp.pdf"
C:\Directum\ShellPrint.exe "%1.tmp.pdf"
del /y %1.tmp.pdf
using System;
using System.Diagnostics;
namespace ShellPrint
{
class Program
{
static void Main(string[] args)
{
if (args.Length > 0)
{
//MessageBox.Show(args[0]);
try
{
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = args[0];
psi.Verb = "printto";
//psi.Arguments = "\\\\ComputerName\\PrinterName";
psi.UseShellExecute = true;
psi.WindowStyle = ProcessWindowStyle.Normal;
Process.Start(psi);
}
catch (Exception e)
{
System.Diagnostics.Debug.WriteLine("Exception: " + e.Message);
}
}
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question