문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top