Index: BL/Flow/Levering/Doc.cls.xml =================================================================== diff -u -r1785 -r1889 --- BL/Flow/Levering/Doc.cls.xml (.../Doc.cls.xml) (revision 1785) +++ BL/Flow/Levering/Doc.cls.xml (.../Doc.cls.xml) (revision 1889) @@ -78,148 +78,6 @@ ]]> - - - s xmlp="\\cache02\c$\Temp\LevBon_63205.xml" - s sc=##class(BL.Flow.Levering.Doc).RenderAndFileFromXML(xmlp,"\\fop\e$\FOP\LevBon_Voorbeeld_20090116.pdf") w sc,! - s xmlp="\\cache02\c$\Temp\LevBon_63205_FR.xml" - s sc=##class(BL.Flow.Levering.Doc).RenderAndFileFromXML(xmlp,"\\fop\e$\FOP\LevBon_Voorbeeld_20090116_FR.pdf") w sc,! -1 -0) NumCopies=1 - Set:($$$ISOK(sc)) sc=Task.AddActionPrint(PrinterName,NumCopies,,) - Quit:($$$ISERR(sc)) sc - Set sc=##class(BL.Sys.FOP.CommonTasks).RunFopTask(Task,$$$rmBatch,$$$qpvLow) ; $$$rmBatch ; $$$rmSync - Quit sc -} - -ClassMethod RenderAndFtpDocXXXxxxOLD(BONNr As %String, FtpServer As %String, DestDir As %String, DestFName As %String, blnShowRembours As %Boolean = 0) As %Status -{ -#define SaveTempFile 1 - ;New Task,sc - Set Task=..CreateFopTaskOLD("DocRenderAndFtp",,) - Set sc=..DocSetRenderDefsOLD(Task.AddDoc(), $LB(BONNr,blnShowRembours,""),..#ADBTemplateNotStapled , "PDF", $LB(), $G(pWithLogo,1)) - If $$$SaveTempFile Do - . Do ..BuildFileData("TempFTP", .FName,.Dir,.FilePath, BONNr) ; The returned 'Dir' can be local path to FOP; the 'Dir in the FilePath' is the network-converted 'Dir' - . Set FtpSrcPath=FilePath - . Set:($$$ISOK(sc)) sc=Task.AddActionFile(FName,Dir) - Else Do - . Set FtpSrcPath="" ; TO DO : indicate that SourceData should be retrieved from the (temp)Stream object - - If $$$LCase(FtpServer)?1(1"vhisiedownload.vanhoecke.be",1"testftp") Do - . Set tmpUserName="Tineke" - . Set tmpPassWord="T!neKe" - . Set tmpPort="" - . Set tmpBinaryFtp="" - Set:($$$ISOK(sc)) sc=Task.AddActionFtp(FtpServer,FtpSrcPath,.DestDir,.DestFName, .tmpUserName, .tmpPassWord, .tmpPort, tmpBinaryFtp) - Quit:($$$ISERR(sc)) sc - Set sc=##class(BL.Sys.FOP.CommonTasks).RunFopTask(Task,$$$rmInLine) ; $$$rmSync - Quit sc -} - -/// FileURL : als .local doorgeven -/// enkel de FileName doorgeven indien gewenst, anders wordt deze ge-default. -/// het volledige pad (server+dir+filename) wordt in URL-vorm teruggegeven -ClassMethod RenderAndFileWWWDocXXXxxxOLD(BONNr As %String, ByRef FileURL As %String, blnShowRembours As %Boolean = 0) As %Status -{ -#define SubDir "Tmp\" -#define SubDirURL $TR($$$SubDir,"\","/") - ; New FName,Dir,FilePath - Set FilePath=$G(FileURL) - Do ..BuildFileData("FileWWW", .FName,.Dir,.FilePath, $G(BONNr,"TestWV")) - Do ..BuildFileData("FileWWWUrl", FName, ,.FileURL) - Quit ..RenderAndFileDoc(.BONNr,FilePath,blnShowRembours) -} - -ClassMethod RenderAndPrintDocViaTypeXXxxOLD(BONNr As %String, LevDocType As %String, PrinterName As %String, blnStapling As %Boolean = 1) As %Status -{ - #define ErrorLevDocTypeInvalid(%v) $$$ERROR($$$GeneralError,"LevDocType "_%v_" onbekend of foutief gedefinieerd.") - - // Get settings - Set PrinterName=$G(PrinterName,..#PrinterDFL) ; "DocuColor" - Set blnShowRembours=1 - Kill arSettings - Do rpdSettingsForLevDocType() - Quit:('$D(arSettings("RP1"))) $$$ErrorLevDocTypeInvalid(LevDocType) - - // Create FopTask - Set Task=..CreateFopTaskOLD("DocRenderAndPrint",,) - Set sc=$$rpdBuildTaskRenderAndPrint("RP1") - If $$$aHasSubNodes(arSettings("RP2")) Do - . Set:($$$ISOK(sc)) sc=$$rpdBuildTaskRenderAndPrint("RP2") - Quit:($$$ISERR(sc)) sc - Set NumCopies=1 - Set:($$$ISOK(sc)) sc=Task.AddActionPrint(PrinterName,NumCopies,,) - Quit:($$$ISERR(sc)) sc - - // Run FopTask - Set sc=##class(BL.Sys.FOP.CommonTasks).RunFopTask(Task,$$$rmBatch,$$$qpvLow+1) ; $$$rmBatch ; $$$rmSync - Quit sc - -rpdBuildTaskRenderAndPrint(Key) - Set lbDocDefs=arSettings(Key,"DocDefs") - Set lbPPODKeywords=$G(arSettings(Key,"PPODKeywords"),$LB()) - Set pWithLogo=$G(arSettings(Key,"BonWithLogo"),1) - Set:($L($G(arSettings(Key,"BewijsWithLogo")))) pWithLogo=pWithLogo_$$$xslpDelim_arSettings(Key,"BewijsWithLogo") - Set pTraySelect=##class(BL.Sys.FOP.CommonTasks).GetPrinterTray(PrinterName,arSettings(Key,"BonPapierSoort"),"TRAY") - Set:($L($G(arSettings(Key,"BewijsPapierSoort")))) pTraySelect=pTraySelect_$$$xslpDelim_##class(BL.Sys.FOP.CommonTasks).GetPrinterTray(PrinterName,arSettings(Key,"BewijsPapierSoort"),"TRAY") - ; Stapling settings - Set StaplingMode=$G(arSettings(0,"StaplingMode")) - Set pStaplingConfig=##class(BL.Sys.FOP.CommonTasks).GetStaplingConfig(PrinterName,.StaplingMode,"2") - - ; Add Doc - If $G(arSettings(Key,"RenderDoc"))="LevBewijs" Do - . Set sc=##class(BL.Flow.TransportLijst.Doc).DocSetRenderDefsLevBewijs(Task.AddDoc(), lbDocDefs , "PS", lbPPODKeywords, pWithLogo, pTraySelect, pStaplingConfig, (StaplingMode="")) - Else Do - . Set Template=$S(StaplingMode="":..#ADBTemplateNotStapled, 1:..#ADBTemplateStapled) ; Set Template=$G(arSettings(Key,"Template")) - . Set pPosLevBewijs=$LG(lbDocDefs,3) - . Set sc=..DocSetRenderDefsOLD(Task.AddDoc(), lbDocDefs, Template, "PS", lbPPODKeywords, pWithLogo, pTraySelect, pStaplingConfig, pPosLevBewijs) - . ;Set sc=..DocSetRenderDefs(Task.AddDoc(), ..lbDocs, ..ADBTemplate, ..TransformType, ..lbPPODKeywords) - - Quit sc - -rpdSettingsForLevDocType() - Set arSettings(0,"StaplingMode")=(''blnStapling) - ; ... - Quit -} - -*/ -]]> - - FileURL : als .local doorgeven