I'm trying to append a blank page to a tiff. I have a function that creates a Letter size (8.5x11) 100x100 dpi bmp. I need the new page to be Letter 300x300 and so I do the following.
- Code: Select all
'(GDEdit is Imaging)
GDResult = GDEdit.CreateImageFromFile(BlankBMP)
If GDResult = 0 Then
Err.Raise 334, "frmViewer.AppendBlankPage()", "Error Creating Blank Tiff"
End If
GDResult = 0
GDResult = GDEdit.SetHorizontalResolution(300)
GDResult = GDResult + GDEdit.SetVerticalResolution(300)
GDResult = GDResult + GDEdit.ResizeImage(2550, 3300)
GDResult = GDResult + GDEdit.SaveAsTIFF(BlankTiff, CompressionCCITT4)
If GDResult <> 0 Then
Err.Raise 334, "frmViewer.AppendBlankPage()", "Error Resizing Blank Page to Letter"
End If
GDResult = GDEdit.TiffMerge2Files(ThisAnnoFile.TempFullPath, BlankBMP, TempFile, CompressionCCITT4)
The Problem is I get a resolution of 900x900 and the size is way off. So i tried GDEdit.ResizeImage(850,1100) that didn't work either. So I tried Just GDEdit.ResizeImage(2550, 3300) without setting the resolution and it is much closer, 8.59x11.11 at 297x297.
Can some one shed some light on how this all works and perhaps a better way. I will be doing a lot of resizing, appending and Inserting of different pages.
Also can someone suggest a way to accomplish inserting and appending blank pages to PDF using GDPicture.
Thank you
Ron
