update 20241210
This commit is contained in:
@@ -253,15 +253,31 @@ namespace OnDoc.DocMgmt
|
||||
private void btnOfficePrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
clsdok dok = new clsdok("", "", "");
|
||||
OfficePrinter.OnDocOffice op = new OfficePrinter.OnDocOffice();
|
||||
|
||||
DocGet gd = new DocGet(AppParams.connectionstring);
|
||||
{
|
||||
dok = gd.GetDoc(dokumentid);
|
||||
}
|
||||
Helper.FileHelper fh = new Helper.FileHelper();
|
||||
string Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
fh.SaveBase64ToFile(dok.dokument, Filename );
|
||||
op.PrintInWord(Filename, AppParams.wordprintmacro);
|
||||
if (dok.doktype == "D")
|
||||
{
|
||||
OfficePrinter.OnDocOffice op = new OfficePrinter.OnDocOffice();
|
||||
Helper.FileHelper fh = new Helper.FileHelper();
|
||||
string Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
fh.SaveBase64ToFile(dok.dokument, Filename);
|
||||
op.PrintInWord(Filename, AppParams.wordprintmacro);
|
||||
op = null;
|
||||
}
|
||||
if (dok.doktype == "P")
|
||||
{
|
||||
docPreview1.printpdf();
|
||||
}
|
||||
if (dok.doktype == "X")
|
||||
{
|
||||
Helper.FileHelper fh = new Helper.FileHelper();
|
||||
string Filename = AppParams.tempdir + dokumentid + "." + dok.extension;
|
||||
fh.SaveBase64ToFile(dok.dokument, Filename);
|
||||
System.Diagnostics.Process.Start("winword.exe", "/w " + Filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user