You can loop through the number of records available in the xml file.
Create a counter variable (of type Integer) and increment the count for each PDF generation.
By default, there is a function called count which is used to find the number of nodes in the given xml. So you can also make use of that.
Create a list variable with subtype of document to save your generate pdf documents.
If you can send a form template and sample data file (the .xml & .xdp files), i would explain you in detail.
but i know extracting by my project dotnet number of element in my file.xml, i don't want to do that.
i want to create a process in workbench which automate this process :
xml+xdp -> generatepdfoutput-> number(n) of pdf generate-> send email to a user input : you have generate n pdf at this date time, on this folder.
after that to run the project, i just call it by adding web reference in my dot net project and invoke it
1 person found this helpful
The generatepdfoutput component will generate only one PDF at a time.
So either you need to invoke the process 'n' times from the .net code which is not suitable for your case (for sending email from workflow)
Or you need to make a loop inside the process to generate multiple PDFs.
Thanks & Regards,
ok so i have to create a process which loop and read my xml element by element and for each element go to generatePDFOutput which generate one pdf
and when my loop is at its end i send a mail you have generate n pdf?
and what about the option generate multi stream in property batch of the operation generatePdfOutput?
thanks for you help, i am a novice in live cycle and i am a little lost actually..
I'm not sure that property will produce multiple PDF document. The PDF Output is the one which is returned by the generatePDFOutput service.
Anyways, confirm your assumption with someone else. I don't have knowledge on the multiple streams property.
Thanks & Regards,
The Batch properties of GeneratePDFOutput are used to generate multiple PDFs from one XML file. The XML has to be structured as a series of 'records'.
There is s good explanation in the LiveCycle Services guide, at http://www.adobe.com/go/learn_lc_services_82. In the bookmarks, go to Output Service > Using The Output Service > Processing Batch Data To Product Multiple Documents.
Great of you!
it's ok when i call output service and i set render option generate multi file = true and recordname = name_element and i put <batch> </batch>
in the beginning end end of my xml file it's running.
My problem is that i want to create a process with operation generatepdfOutput and something in this process should count the number of pdf generate and when all is generate it should send a email to a user provide in input.
actually i am far for that because just create a process with generatePdfOutput seems to be impossible!!!!
when i invoke the process and give the parameter i have a probleme with one of them : dataxml which should give the path of the xml file which contain the data.
in my process i define xmldata as a variable document input and i do that in my code :
String inPutFile = "C:\\creerPdf\\PurchaseOrder.xml";
FileStream fs = new FileStream(inPutFile, FileMode.Open);
fs.Read(byteArray, 0, longueur);
inData.binaryData = byteArray;
BLOB generatePDFOutputMetaDataDoc = new BLOB();
BLOB generatePDFOutputResultDoc = new BLOB();
OutputResult outResult = new OutputResult();
EssaiOutputService essaiOutput = new EssaiOutputService();
new System.Net.NetworkCredential("administrator", "password");
generatePDFOutputMetaDataDoc = essaiOutput.invoke(
"c:\\creerPdf", inData, "BonCmdeDynamiq.xdp", out outResult, out generatePDFOutputResultDoc);
and it renders this error :
ALC-DSC-127-000: com.adobe.idp.dsc.LongLivedInvocationException: The Long Lived Service EssaiOutput can not be invoked synchronously.
is somoene knowing what it is wrong?
The process is long-lived and so it must be executed asynchronously. You can either:
- change the process to be short-lived using the advanced tab of the process propeties (http://livedocs.adobe.com/livecycle/8.2/wb_help/000278.html)
- change your code to execute it asynchronously (http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000285.html)
ok thank you!