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

Question

Question

Document Exporter Page Formats for Image Files

asked on March 26, 2018 Show version history

With image file exports (DocumentExporter.ExportPages) you can select a number of different file formats:

DocumentPageFormat.Tiff
DocumentPageFormat.Png
DocumentPageFormat.Gif
DocumentPageFormat.Jpeg
DocumentPageFormat.Bmp
DocumentPageFormat.TiffJpeg

However, by default all of these formats are saved as tifs when they are brought into Laserfiche.  In addition, the mime type is not stored for image files, only for Edocs.  For situations where is important to retain the original file formats, an experiment showed that this is just a matter of removing the extension from Tools, Options, New Documents, File Conversion.

In that case .bmps etc are treated like Edocs, and have a mime type and extension in the DocumentInfo object.

So, what is the purpose of different export formats for images, when you can't tell the image type/mime type of the image before hand?

 

 

0 0

Answer

SELECTED ANSWER
replied on March 26, 2018

The purpose is that depending on your use case, you may want an image page exported in a particular format.  If the image was not converted and saved as an edoc on import and you want to export it in that same format, you don't need any of the functionality this class provides.

0 0

Replies

replied on March 26, 2018

Thanks, Brian -

The main use I see for things like DocumentPageFormat.Gif would be to preserve the original file contents.  As image file formats get more complex over time, it would be nice to also have the original image file mime types, even if the images are then stored as tif files. That would close the loop nicely.

 

0 0
replied on March 26, 2018

If the image was converted it's too late to preserve the original file contents.  Even if you knew that the file was originally a Gif it's not guaranteed that the conversions Gif -> Tiff -> Gif will give an identical result.  From my perspective, if you are talking about exporting an image page, it's all about what you want to do with it.  If you want to render it in a browser, you probably want Doc Exporter to output as a PNG.  What's the use case for exporting it in the same format it was in before it was imported?

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

Sign in to reply to this post.