Is there a way to insert a new scanned page into a multipage TIF at a particular page number rather than to the end, such as adding a cover page to an existing multipage tiff? Or if not is there a way to merge 2 or more Tiffs?
[Update by Loïc Carrère]. See: viewtopic.php?t=395
Append to a Multipage Tiff
[Update by Loïc Carrère]. Deprecated post. See: viewtopic.php?t=395
Hi,
To write to on an existing multipage tif image you need:
- Extract all the pages into temporary image files.
- Recompose new multi page tif file from the temporary files.
However, for the next release I will add a method to merge two tif files.
Best regards,
Loïc Carrère
Hi,
To write to on an existing multipage tif image you need:
- Extract all the pages into temporary image files.
Code: Select all
Imaging1.CreateImageFromFile sMultiPageTiffPath
nImageID = Imaging1.CreateImageFromFile("inputmultipage.tif")
nPageCount = Imaging1.TiffGetPageCount
For nCpt = 1 To nPageCount
Imaging1.TiffSelectPage (nCpt)
Imaging1.SaveAsTiff (Str(nCpt) & ".tif")
Next nCpt
Imaging1.CloseNativeImage
Code: Select all
nImageID = Imaging1.CreateImageFromFile("1.tif")
Imaging1.TiffSaveAsNativeMultiPage ("outputmultipage.tif")
For nCpt = 2 To nPageCount
nImageID = Imaging1.CreateImageFromFile(str(nCpt) & ".tif")
Imaging1.TiffAddToNativeMultipage (nImageID)
Imaging1.CloseImage (nImageID)
next nCpt
'Here add your new image, ex Imaging1.TiffAddToNativeMultipage (nNewImageID)
Imaging1.TiffCloseNativeMultiPage
However, for the next release I will add a method to merge two tif files.
Best regards,
Loïc Carrère
Last edited by Loïc on Tue Dec 04, 2007 7:30 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 2 guests