Hello everyone,
I'm experimenting with exporting Laserfiche document image pages from a native Workflow SDK Script.
My goal is to export all image pages from the Workflow document as individual PNG files.
Environment
- Laserfiche Workflow 12
- Workflow SDK Script (C#)
- Base class: RAScriptClass120
- Laserfiche.RepositoryAccess 12.0.0.0
- Laserfiche.DocumentServices 10.4.0.0 (latest version available on the Laserfiche Support site)
The Workflow Editor warns that DocumentServices 10.4 references RepositoryAccess 10.4 while Workflow is using RepositoryAccess 12.0, but it allows the workflow to publish.
To isolate the problem, I built the script up one step at a time.
The following all work successfully:
- BoundEntryInfo is populated correctly.
- I can cast BoundEntryInfo to DocumentInfo.
- I can read the document ID, name, and page count.
- DocumentExporter instantiates successfully.
- I can set:
exporter.PageFormat = DocumentPageFormat.Png;
The failure occurs only when calling:
exporter.ExportPage(document, 1, outputPath);
The exception is:
System.EntryPointNotFoundException
Stack trace:
at Laserfiche.RepositoryAccess.IDocumentContents.GetPageInfos(PageSet pageSet)
at Laserfiche.DocumentServices.DocumentExporter.ExportPages(...)
at Laserfiche.DocumentServices.DocumentExporter.ExportPage(...)
The output PNG file is created but remains 0 bytes because the exception occurs before any image data is written.
My questions are:
1. Has anyone successfully used DocumentExporter from a Workflow 12 SDK Script?
2. Is there a newer version of Laserfiche.DocumentServices that is compatible with RepositoryAccess 12?
3. Is DocumentExporter still the recommended API for exporting Laserfiche image pages, or has it been replaced by another API in RepositoryAccess 12?
4. If you've implemented page export from a Workflow SDK Script in Laserfiche 12, what approach did you use?
I've also opened a Laserfiche Support case, but I thought I'd ask here in case someone has already encountered this issue or found another supported approach.
Thanks!