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

Question

Question

Workflow Export Doc Script Issue

asked on May 25, 2016 Show version history

Hello,

I have been trouble-shooting an issue and am wondering if any of you have run across it or see an issue with my code.

The script exports approximately 400 documents to a local drive correctly on the first run thru but subsequent run thrus have 0 page documents.  The number of 0 page documents increases on each subsequent run thru.

Here is my code:

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports Laserfiche.RepositoryAccess
Imports Laserfiche.DocumentServices
Imports System.IO


Namespace WorkflowActivity.Scripting.SDKScript
    Public Class Script1
        Inherits RAScriptClass92
        Protected Overrides Sub Execute()
                Dim MySession As Session = me.RASession
                Dim MyDocument As Laserfiche.RepositoryAccess.DocumentInfo
                Dim ExportDoc As New DocumentExporter
                Dim EntryID as Integer = me.BoundEntryId

MyDocument = Document.GetDocumentInfo(EntryID,MySession)
    
                Dim FileName as String = GetTokenValue ("Entry Name")
                Dim FilePath as String = GetTokenValue ("Path")

                Try

                ExportDoc.PageFormat = DocumentPageFormat.Tiff
                ExportDoc.IncludeAnnotations = True
                ExportDoc.BlackoutRedactions = True
                ExportDoc.ExportPages(MyDocument, MyDocument.AllPages, FilePath & "\" & FileName & ".tif")

                Catch ex As Exception

                MsgBox(ex.ToString)
                End Try
                MyDocument.Dispose


        End Sub
    End Class
End Namespace

I apreciate any help!!!

Thanks!

Terri

Answer

SELECTED ANSWER
replied on May 25, 2016

This is the same issue described in this other post. It looks like you're running 9.2, so the workaround described there should work for you. Workflow 10 fixes it for the case where annotations are not included. A complete fix is not possible at this time because of the bug being in Windows code we rely on for rendering annotations.

replied on May 25, 2016

Thanks again Miruna!!! I missed that post while searching.

Replies

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