Domanda

This code will get me the first page of a file from FileNet file and convert it to a tiff.

string fileNm = fnDoc.GetCachedFile(1, "", 
                        IDMObjects.idmGetCachedFileOptions.idmDocGetOriginalFileName);
string name = fnDoc.Name;            
string onlyName = fnDoc.Name;

m_destFile = pathStart + docSubPath + name + ".tif";

File.Copy(fileNm, m_destFile, true);
File.SetAttributes(m_destFile, FileAttributes.Normal);

How do I instead, loop through the pages and then combine all the tiff's into one tiff file with multiple pages?

È stato utile?

Soluzione

The method GetCachedFile() first parameter is the page you want to fetch, so you can iterate the File, along the number of pages.

What you are doing with that code, is copying the first page of a cached file, from the cache to a path.

Also you can read in this question, how to merge the generated TIFF:

Merging multiple TIFF files in one TIFF file

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top