Update 20251107
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1632,7 +1632,7 @@ namespace OnDocOffice
|
||||
return;
|
||||
|
||||
}
|
||||
public bool insert_signature(string dokumentid, string unterschriftlinks, string unterschriftrechts, string tempdir, string dokumenttypnr )
|
||||
public bool insert_signature(string dokumentid, string unterschriftlinks, string unterschriftrechts, string tempdir, string dokumenttypnr , int pages)
|
||||
{
|
||||
DB db = new DB(this.connectstring);
|
||||
System.Data.DataTable dt = new System.Data.DataTable();
|
||||
@@ -1678,7 +1678,7 @@ namespace OnDocOffice
|
||||
clsFileHelper.SaveBase64ToFile(unterschriftrechts, path_unterschriftrechts);
|
||||
}
|
||||
word_signature word_Signature = new word_signature(this.connectstring);
|
||||
word_Signature.sign_doc(ref word, path_unterschriftlinks, path_unterschriftrechts, dokumentid,dokumenttypnr);
|
||||
word_Signature.sign_doc(ref word, path_unterschriftlinks, path_unterschriftrechts, dokumentid,dokumenttypnr,pages);
|
||||
if (System.IO.File.Exists(path_unterschriftlinks)) { System.IO.File.Delete(tempdir + dokumentid + "UL.png"); };
|
||||
if (System.IO.File.Exists(path_unterschriftrechts)) { System.IO.File.Delete(tempdir + dokumentid + "UR.png"); }
|
||||
|
||||
@@ -1719,7 +1719,7 @@ namespace OnDocOffice
|
||||
|
||||
|
||||
|
||||
public bool sign_doc(ref Microsoft.Office.Interop.Word.Application word, string imagepath_ul, string imagepath_ur, string dokumentid, string dokumenttypnr)
|
||||
public bool sign_doc(ref Microsoft.Office.Interop.Word.Application word, string imagepath_ul, string imagepath_ur, string dokumentid, string dokumenttypnr, int pages=0)
|
||||
{
|
||||
Logging.Logging.Debug("Sign_Doc", "OnDoc", dokumentid);
|
||||
docWord = word.ActiveDocument;
|
||||
@@ -1727,18 +1727,18 @@ namespace OnDocOffice
|
||||
|
||||
DB db = new DB(this.ConnectionString);
|
||||
|
||||
int pages = 0;
|
||||
try
|
||||
{
|
||||
object miss = System.Reflection.Missing.Value;
|
||||
//pages = word.ActiveDocument.Words.Last.Information[WdInformation.wdActiveEndPageNumber];
|
||||
Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;
|
||||
pages = word.ActiveDocument.ComputeStatistics(stat, ref miss);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logging.Logging.Debug("Sign_Doc - Pages not found "+e.Message, "OnDoc", dokumentid);
|
||||
}
|
||||
//int pages = 0;
|
||||
//try
|
||||
//{
|
||||
// object miss = System.Reflection.Missing.Value;
|
||||
// //pages = word.ActiveDocument.Words.Last.Information[WdInformation.wdActiveEndPageNumber];
|
||||
// Microsoft.Office.Interop.Word.WdStatistic stat = Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages;
|
||||
// pages = word.ActiveDocument.ComputeStatistics(stat, ref miss);
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// Logging.Logging.Debug("Sign_Doc - Pages not found "+e.Message, "OnDoc", dokumentid);
|
||||
//}
|
||||
|
||||
db.clear_parameter();
|
||||
db.add_parameter("@dokumenttypnr",dokumenttypnr.ToString());
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user