You are viewing limited content. For full access, please sign in.

Question

Question

Workflow SDK Script Create an entry

asked on March 2, 2015

Hi, how can i create a new entry (e.g a copy of a PDF entry) using SDK Script in C# in the Workflow.

 

Thanks in advance.

1 0

Replies

replied on March 3, 2015

Assuming Workflow 9.1 or higher:

EntryInfo EI = Entry.GetEntryInfo("\\Start\\Doc1", RASession);
EI.CopyTo("\\Dest1\\Doc1", EntryNameOption.AutoRename);

 

0 0
replied on March 3, 2015

thank you ... but is there a way to copy file to the local server harddisk?

0 0
replied on March 4, 2015

That's not a copy action, that's export. You can take a look at your SDK documentation for the methods to export electronic documents or images.

0 0
replied on May 19, 2016

Good Day Miruna,

 

We are interested in writing an SDK script to export TIFF, Audio, and Image files out of Laserfiche to a network path through workflow. We have several thousands of documents that we currently have to manually export and import into another application. Could you please give me direction on where I can find more information on how we can write this SDK script?

 

Thank You,

Zach Merrill

0 0
replied on May 19, 2016

Certainly. See the Tutorial on Import and Export Documents through DocumentServices in the SDK help file as well as the DocumentExporter class in the Laserfiche.DocumentServices section.

For Workflow, you have the RA reference by default in SDK Scripts (in of 9.2 and higher), you'll have to add a reference to the corresponding version of Laserfiche.DocumentServices.

The script will have the EntryInfo and session, so you don't have to worry about making those on your own. Since Laserfiche.DocumentServices is not a default reference, you'll have reference its methods by full name.

So what looks like this in the SDK documentation:

DocumentInfo DI = Document.GetDocumentInfo(12345, mySess);
DocumentExporter DE = new DocumentExporter();
DE.PageFormat = DocumentPageFormat.Tiff;
DE.ExportPages(DI, new PageSet("1-5"), "C:\\Temp\\MultiPageTiff.tif");

will look something like this in WF (with extra options for including annotations and burning redactions into the image):

            DocumentInfo DI = (DocumentInfo)this.BoundEntryInfo;
            Laserfiche.DocumentServices.DocumentExporter DE = new Laserfiche.DocumentServices.DocumentExporter();
            DE.PageFormat = Laserfiche.DocumentServices.DocumentPageFormat.Tiff;
            DE.BlackoutRedactions = true;
            DE.IncludeAnnotations = true;
            DE.ExportPages(DI, new PageSet("1-5"), "C:\\temp\\MultiPageTiff.tif");

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.