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

Question

Question

PDFs shown as LF Docs

asked on December 18, 2017

I am currently experiencing an issue due to a previous integration that was not our own. This integration would import documents from one system into Laserfiche. The issue is these documents are PDFs though appear as LF Pages within the client. If we check the document properties they show the document as a PDF with no pages associated with it. If we generate pages the document has pages generated for it and then we can delete the electronic file associated with it. There was an issue with the integration importing the document as a page instead of an electronic document. Since this has been corrected documents are being displayed correctly. I wanted to know if there is a simple way to possibly change a flag to have the documents correctly be displayed as PDFs for these older documents.

0 0

Answer

SELECTED ANSWER
replied on December 19, 2017

Okay, looking at it again, the problem might be the lack of an edoc extension value. If you notice, it has the mime type, but the "Extension" field is empty.

If you can identify the affected documents, you can correct this with SDK scripts by manually setting an Extension value.

For example,

doc.Extension = ".pdf";

The LF database toc table has two separate columns (edoc_mime and edoc_ext); it looks like for whatever reason the edoc_ext was not set.

As a result, the application knows the mime type, but it still treats it like a standard LF document because there is no file extension to tell it otherwise.

0 0

Replies

replied on December 19, 2017

Have you tried bringing in any other PDFs, and are they also affected? Also, did you have errors when you tried opening the documents?

The reason I ask is that client settings can tell LF to treat PDFs like LF documents. I know I have mine set that way so I see the same icon for both PDF and docs with pages.

Again, I don't know if it actually has anything to do with what you were seeing since I don't have all the details, I just thought I would ask.

0 0
replied on December 19, 2017

Unfortunately this is not the case with this. I am able to see both types of files. This was due how the files were imported before using an SDK script. I have verified that that item is unchecked.

0 0
SELECTED ANSWER
replied on December 19, 2017

Okay, looking at it again, the problem might be the lack of an edoc extension value. If you notice, it has the mime type, but the "Extension" field is empty.

If you can identify the affected documents, you can correct this with SDK scripts by manually setting an Extension value.

For example,

doc.Extension = ".pdf";

The LF database toc table has two separate columns (edoc_mime and edoc_ext); it looks like for whatever reason the edoc_ext was not set.

As a result, the application knows the mime type, but it still treats it like a standard LF document because there is no file extension to tell it otherwise.

0 0
replied on December 21, 2017

I attempted to change the edoc_ext column since the edoc_mime was correct. When I made the change the icon was changed though the properties remained the same with the empty extension type.

0 0
replied on December 21, 2017

Did you make the change with an SDK script or directly in the database? If you did it directly in the database, the change might not show up in the properties until you restart the Laserfiche Server service.

0 0
replied on December 21, 2017 Show version history

I had contacted the other party that created the script and corrected them some time ago. New incoming documents come in fine now. These were for documents that were imported prior incorrectly. I made the modification directly to the database. I'll see if I can have the service restarted. 

0 0
replied on December 21, 2017

If you modified the database directly, you can restart the service after business hours and that should get the updated values to show up in the properties.

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

Sign in to reply to this post.