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

Question

Question

Remove PDF After Page Generation

asked on October 29, 2021

I love the the new DCC functionality for Page Generation however I cannot find in the corresponding new Workflow activity ("Schedule PDF Page Generation") where I can have it delete the original PDF upon completion.  And while there is an activity to Attach an electronic document, there is not one to Detach an electronic document.  I know this can be done currently via custom script but are there plans to do either/both of these options:

  1. Update "Schedule PDF Page Generation" Workflow activity to include an option to keep or not keep original PDF's, similar to what is in ImportAgent (as seen below)?
  2. Add a new activity (or update existing "Attach Electronic Document") to allow detaching/removal of the electronic document?
1 0

Replies

replied on October 29, 2021

If SDK Script works in v11...

 

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

Namespace WorkflowActivity.Scripting.SDKScriptDeleteEdoc
    '''<summary>
    '''Provides one or more methods that can be run when the workflow scripting activity is performed.
    '''</summary>
    Public Class ITS_DeleteElectronicFile
        Inherits RAScriptClass104
        '''<summary>
        '''This method is run when the activity is performed.
        '''</summary>
        Protected Overrides Sub Execute()
            'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session
            CType(BoundEntryInfo, DocumentInfo).DeleteEdoc()
        End Sub
    End Class
End Namespace

1 0
replied on October 29, 2021

Thanks. We are currently using that script to handle this but I am hoping Laserfiche will add it directly into the updated DCC and/or a standard Workflow activity so we don't have to continue to write custom code to perform what should be built-in functionality.

1 0
replied on May 26

It takes a ton of extra work to have a scheduled job that runs the script to remove the PDF once the DCC has generated the pages when it otherwise seems so easy to have the DCC just have an option to remove the PDF.  

I wanted to bump this to see if the DCC can be updated to delete the original PDF after page generation? 

0 0
replied on May 27

Beau,

  Don't use the SDK Script I provided above.  It removes the association of the electronic file from the document, but it does not delete the file from the volume.

Sorry Folks,

Jim.

0 0
replied on May 27

No worries.  I misspoke as we are actually using built-in activities in Workflow to remove the PDF after the DCC generates the Laserfiche pages:

  1. Create an empty Laserfiche doc
  2. Copy the Laserfiche pages generated by DCC, along with the metadata, to the empty doc
  3. File the new doc
  4. Delete the old doc that still has the PDF attached

 

Just a lot of steps for something that could likely be easily implemented into the DCC PDF page generation process.

0 0
replied on May 27

Agreed.  That is the process we're using now.

1 0
replied on May 27

Deleting files from the volume is done a background thread so it won't affect repository performance during large deletion events. Your script does remove the electronic component but it make take a few hours to see it disappear from the volume.

0 0
replied on July 29

Thanks Miruna.  I'll re-test when I get a chance.

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

Sign in to reply to this post.