コミュニティ

Export deleted documents 回答済み

Hi, everyone!

I want to export document(s) to PDF file format which is manually deleted in verificaton station. Is it possible? And how to make it?

Thanks in advance!

Best regards

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

4件のコメント

  • Avatar
    Permanently deleted user

    Hello,

    I have tried several workarounds:

    You cannot use the Event "Before document delete" for this, because the document is read-only in this event.

    You also cannot use User commands for this.

    But the workaround would be the following:

    1. In the "On Task Window Create" event you disable the Delete command for users:

    TaskWindow.MainWindow.EnableCommand(TCommandID.CI_EditClear , false);

     

    2. Create a document processing stage in the workflow that will save the document and mark it for deletion:

    IExportImageSavingOptions options = FCTools.NewImageSavingOptions();

    options.Format = "pdf";

    options.ShouldOverwrite = true;

    Document.SaveAs("C:\\Temp\\out.pdf",options);

    Document.Properties.Set("MarkedForDeletion","true");

    3. After this stage you place a Batch processing stage with the following script:

     

    foreach(IDocument doc in Batch.Documents)

    {

        if(doc.Properties.Get("MarkedForDeletion") == "true"){

            Batch.DeleteDocument(doc);

        }

    }

     

    foreach(IDocument doc in Documents)

    {

        if(doc.Properties.Get("MarkedForDeletion") == "true"){

            Batch.DeleteDocument(doc);

        }

    }

    You can also forward the batch afterwards to the Processed station so it can be deleted automatically after some time.

    So instead of deleting the documents operator will have to send them to deletion stage in the workflow.

    I have tested this workaround in FC12. Let me know if you need a sample project.

     

     

     

     

     

     

    0
  • Avatar
    Permanently deleted user

    Dear Alexey,

    I have tried  but it seems that I had made something wrong. Could you please send me a sample project?

    0
  • Avatar
    Permanently deleted user

    Hello, sorry for keeping you waiting.

    Here is the link:

    https://share.abbyy.com/index.php/s/uVDUIW08kjHIVtN

    0
  • Avatar
    Permanently deleted user

    Hello, 

    Thank you for your support!

     

    Best regards

    0

サインインしてコメントを残してください。