Index: BL/Sys/FOP/Verwerker/tmpDev.mac.rou =================================================================== diff -u -r29059 -r61687 --- BL/Sys/FOP/Verwerker/tmpDev.mac.rou (.../tmpDev.mac.rou) (revision 29059) +++ BL/Sys/FOP/Verwerker/tmpDev.mac.rou (.../tmpDev.mac.rou) (revision 61687) @@ -20,6 +20,8 @@ . . Do MergePrintOMR . Else If FopTask.AnalyseRoutine["RappelPrintOMR" Do . . Do RappelPrintOMR + . Else If FopTask.AnalyseRoutine = "DocRenderAndPrintPakbonAndPrintLeverbonPdfFile" Do + . . Do DocRenderPakbonAndPrintPdf ; full name is too long (max 32 char); should be DocRenderAndPrintPakbonAndPrintLeverbonPdfFile . Else If FopTask.AnalyseRoutine["PrijsLijstPPODArchiveren" Do . . Do PrijsLijstSaveXmlRenderToPPOD . Else If FopTask.AnalyseRoutine["FaxRenderToPPODMergeAndSend" Do @@ -652,6 +654,53 @@ Do AddSeqItemRenderAndSaveToPPOD(TSeq,Task,,0) Quit sc + +DocRenderPakbonAndPrintPdf + Set sc=$$DocRenderPakbonAndPrintPdfSub() + Quit +DocRenderPakbonAndPrintPdfSub() + New blnOpkuisenPdfNaPrinten + Set blnOpkuisenPdfNaPrinten = $$$True ; Config-item of via param door te geven? + + New Task,TSeq,SeqItem,Doc,DocKey,sc + Set Task = FopTask + Set sc = $$drpControleerDocsPakbonAndPdf(Task) + Quit:($$$ISERR(sc)) sc + + Set TSeq=##class(BL.Sys.FOP.Data).NewTaskSequence(Task) + Set arTaskSeq(0,"OBJTSeq")=TSeq + + // Build SeqItem to render PakBon + Set DocKey="" + Set Doc=Task.Docs.GetNext(.DocKey) + Do AddSeqItemRenderAndPrint(TSeq,Task,Doc,0) + Quit:($$$ISERR(sc)) sc + + // Build SeqItem to Print File + Set Doc=Task.Docs.GetNext(.DocKey) + Set SeqItem=$$asqCreateSeqItemDocBase(TSeq,"PrintPDF","A","vh_printFileProcessor") + Do asqAddParamsLoadFileTask(SeqItem,Doc.DataRef) + Do asqAddParamsPrintTask(SeqItem,Task.ActionPrint) + Quit:($$$ISERR(sc)) sc + + // Build Cach�-SeqItem to delete the .pdf file after printing + Do:(blnOpkuisenPdfNaPrinten) AddSeqItemDeleteFiles(TSeq,Doc.DataRef,0) + Quit:($$$ISERR(sc)) sc + + Quit sc + +drpControleerDocsPakbonAndPdf(Task) + New CntDocMain + Set CntDocMain = Task.Docs.Count() + Quit:(CntDocMain = 0 ) $$$ErrorFopTaskHasNoDoc($S($L(Task.%Id()):Task.%Id(), 1:Task)) + Quit:(CntDocMain '= 2) $$$ERROR($$$GeneralError,"Error processing 'DocRenderAndPrintPakbonAndPrintLeverbonPdfFile' : exact 2 documents should be supplied in Task '"_$S($L(Task.%Id()):Task.%Id(), 1:Task)_"'. Task has "_CntDocMain_" doc(s) added.") + // [TODO, indien nodig] + // Extra controle toevoegen om te checken dat + // - het eerste doc de Pakbon-RenderData bevat + // - het tweede doc een PDF-Filename bevat + Quit $$$OK + + /// Algemeen Document : Render and Ftp: DocTransformXslt Set sc=$$DocTransformXsltSub()