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

Question

Question

Email Archive Deletes PDF on error

asked on June 26, 2024 Show version history

Howdy all,

We're getting an odd case of a PDF being move to the recycle bin by Email Archive when there's an error. It's deleted before workflow can access it, and it the users it's never visible. I'm hoping someone here has seen it before.

 

The biggest problem is that file is functionally lost.

 

Email Archive Version 11.0.0.332



Audit Trail reports the following sequence in the first second:

  1. Create Document
  2. Write E-File Contents
  3. Create Page
  4. Modify Page
  5. Create Page
  6. Modify Page
  7. Create Page
  8. Modify Page
  9. Recycle Entry

 

 

The event viewer for Email Archive reports the error:
 

Account [EMAIL ACCOUNT]: Exception occurred when processing mail (22a52dee-e968-42bb-937a-13c8ba1db4bb) attachment in profile Project Invoice.
 
System.InvalidCastException
 
Message: Unable to cast object of type 'iTextSharp.text.pdf.PdfDictionary' to type 'iTextSharp.text.pdf.PdfArray'.
 
StackTrace:    at Laserfiche.PdfServices.AnnotsImporter.ImportPDFPageAnnotsWithiTextSharp(PdfDictionary pageDict, DocumentInfo doc, PageInfo page)
   at Laserfiche.PdfServices.AnnotsImporter.ImportPDFAnnotsWithiTextSharp(PdfReader pdfReader, DocumentInfo doc)
   at Laserfiche.PdfServices.PdfExtractor.ImportPDFPagesFromStream(Stream pdfStream, DocumentInfo doc)
   at Laserfiche.PdfServices.PdfExtractor.ImportPDFStream(Stream pdfStream, DocumentInfo doc, DateTime dtLastModified)
   at Laserfiche.EmailArchive.Workers.ImportDocumentWork.GeneratePdfPages(DocumentInfo doc, IImportDocumentWorkSettings settings, IImportDocumentSource source)
   at Laserfiche.EmailArchive.Workers.ImportDocumentWork.ImportDoc(DocumentInfo doc, IImportDocumentWorkSettings settings, IImportDocumentSource source)
   at Laserfiche.EmailArchive.EmailExecuteJob.AttachmentDistWrapper.CreateAttachments(LfAttachmentCollection attachments, ICreateDocumentWorkParameters emailCreateDocParameter, IImportDocumentWorkSettings importSettings, AssignMetadataWork assignMetaWork)

 

0 0

Replies

replied on June 27, 2024

Is it a generic problem for all PDF files or a specific problem only for this PDF file? You may contact support about this case and provide the PDF file if the case only occurs with it.

0 0
replied on June 27, 2024

Hi Matt, I think this is expected behavior. If there is an error when Email Archive tries import the email or attachments, those incomplete documents in repository will be cleaned up. The source email will be moved to the error folder in your email server. And no workflows will not be triggered. 

In this process, there is no data lost, as the source email still exists in your email server. You have to figure out the cause of the error, and move the failed email into monitored folder and let Email Archive try to import those emails again.

0 0
replied on July 2, 2024

Two thoughts:

  1. That's not really the ideal behavior since it would fail silently and no one would know we've missed an email.  Since workflow never sees the document we can't attach events to it for error messages.
  2. Even if that was a good idea it didn't work. We've tested several times and the failed email wasn't move into the error folder, it was moved into the processed folder.
     

I'll open a support ticket,

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

Sign in to reply to this post.