update 0250704
This commit is contained in:
@@ -539,6 +539,36 @@ namespace DOCGEN.Klassen
|
||||
case "DOKUMENTSCHUETZEN":
|
||||
document.Protect(ProtectionType.AllowOnlyFormFields, "Australia");
|
||||
break;
|
||||
case "FORMULARAKTUALISIERENXY":
|
||||
if (document.ProtectionType != ProtectionType.NoProtection)
|
||||
{
|
||||
document.Protect(ProtectionType.NoProtection, "Australia");
|
||||
try
|
||||
{
|
||||
document.UpdateDocumentFields();
|
||||
}
|
||||
catch { }
|
||||
try
|
||||
{
|
||||
document.UpdateFields = true;
|
||||
}
|
||||
catch { }
|
||||
document.Protect(ProtectionType.AllowOnlyFormFields, "Australia");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
document.UpdateDocumentFields();
|
||||
}
|
||||
catch { }
|
||||
try
|
||||
{
|
||||
document.UpdateFields = true;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -939,8 +969,16 @@ namespace DOCGEN.Klassen
|
||||
return barcodeimage;
|
||||
break;
|
||||
case "1":
|
||||
barcodeimage = Barcode.Get_Datamatrix(DataMatrix.net.DmtxScheme.DmtxSchemeAscii, docData.barcode_content, 6, 6, 0, "Right", docData.barcode_text + docData.barcode_zusatz, docData.Zusatz_Font, docData.Zusatz_FontSize);
|
||||
barcodeimage = AutoSizeImage(barcodeimage, docData.barcode_width, docData.barcode_height, false);
|
||||
if (docData.barcode_left > 200)
|
||||
{
|
||||
barcodeimage = Barcode.Get_Datamatrix(DataMatrix.net.DmtxScheme.DmtxSchemeAscii, docData.barcode_content, 6, 6, 0, "Left", docData.barcode_text + docData.barcode_zusatz, docData.Zusatz_Font, docData.Zusatz_FontSize);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
barcodeimage = Barcode.Get_Datamatrix(DataMatrix.net.DmtxScheme.DmtxSchemeAscii, docData.barcode_content, 6, 6, 0, "Right", docData.barcode_text + docData.barcode_zusatz, docData.Zusatz_Font, docData.Zusatz_FontSize);
|
||||
}
|
||||
//barcodeimage = AutoSizeImage(barcodeimage, docData.barcode_width, docData.barcode_height, false);
|
||||
return barcodeimage;
|
||||
break;
|
||||
default:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -27,6 +27,7 @@ using Helper;
|
||||
using Syncfusion.XlsIO.Parser.Biff_Records;
|
||||
using System.Buffers.Text;
|
||||
using Syncfusion.ExcelToPdfConverter;
|
||||
using OnDocOffice;
|
||||
|
||||
|
||||
namespace DOCGEN
|
||||
@@ -151,7 +152,7 @@ namespace DOCGEN
|
||||
db.Get_Tabledata("select * from Relaunch_View_PDF_Parameter where dokumentid='" + DocID + "' order by sort", false, true);
|
||||
return GetDocAsPDF(DocID, db.dsdaten.Tables[0]);
|
||||
}
|
||||
public clsdok GetDocAsPDF(string Docid, DataTable pdfparameters = null)
|
||||
public clsdok GetDocAsPDF(string Docid, DataTable pdfparameters = null,string tempdir="", bool schnellansicht = false)
|
||||
{
|
||||
clsdok dok = GetDoc(Docid);
|
||||
|
||||
@@ -160,6 +161,36 @@ namespace DOCGEN
|
||||
switch (dok.doktype.ToUpper().Substring(0, 1))
|
||||
{
|
||||
case "D":
|
||||
if (schnellansicht)
|
||||
{
|
||||
dok.dokument = Convert_Word_To_PDF(dok.dokument.ToString(), pdfparameters);
|
||||
dok.extension = "pdf";
|
||||
return dok;
|
||||
}
|
||||
DB db1 = new DB(connectionstring);
|
||||
|
||||
string SQL = "SELECT dbo.dokumenttyp.ErstellungInOffice FROM dbo.dokument INNER JOIN dbo.dokumenttyp ON dbo.dokument.dokumenttypnr = dbo.dokumenttyp.dokumenttypnr where dbo.dokument.dokumentid=@dokumentid";
|
||||
db1.clear_parameter();
|
||||
db1.add_parameter("@dokumentid", Docid);
|
||||
db1.Get_Tabledata_Addvar(SQL, false, true);
|
||||
try
|
||||
{
|
||||
if (Convert.ToBoolean(db1.dsdaten.Tables[0].Rows[0]["Erstellunginoffice"]))
|
||||
{
|
||||
OnDocOffice.OfficeToPDF officeToPDF = new OnDocOffice.OfficeToPDF();
|
||||
dok.dokument = officeToPDF.word_to_pdf(Docid, connectionstring, tempdir);
|
||||
|
||||
officeToPDF = null;
|
||||
return dok;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
finally {
|
||||
db1 = null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
dok.dokument = Convert_Word_To_PDF(dok.dokument.ToString(), pdfparameters);
|
||||
dok.extension = "pdf";
|
||||
return dok;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user