MessageBox.Show( "Finished! Status: " + status.ToString(), "TIFF to PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Information) Checking whether an error occurred in adding any image to the PDF document. If (oGdPicturePDF.GetStat() != GdPictureStatus.OK) Adding the selected tiff page as a resource to a PDF document and draw it on a new page. OGdPictureImaging.TiffSelectPage(imageId, i) Int NumberOfPages = oGdPictureImaging.TiffGetPageCount(imageId) įor ( int i = 1 i <= NumberOfPages i++) Status = oGdPicturePDF.SaveToFile( "output.pdf") If (oGdPicturePDF.GetStat() = GdPictureStatus.OK) OGdPicturePDF.AddImageFromGdPictureImage(imageId, PdfAdvancedImageCompression.PdfAdvancedImageCompressionMRC) Adding an image as a resource and drawing it onto a new page. If (oGdPictureImaging.TiffIsMultiPage(imageId) = false) //One-page tiff image. GdPicturePDF oGdPicturePDF = new GdPicturePDF() ![]() GdPictureStatus status = GdPictureStatus.OK If (oGdPictureImaging.GetStat() = GdPictureStatus.OK) Int imageId = oGdPictureImaging.CreateGdPictureImageFromFile( "Image.tif") OGdPictureImaging.TiffOpenMultiPageForWrite( false) Setting the option for subsequently opened multi-tiff images with read-only capabilities. GdPictureImaging oGdPictureImaging = new GdPictureImaging() Status: " + oGdPictureImaging.GetStat().ToString(), "TIFF to PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Error) ![]() MessageBox.Show( "The image file can't be loaded. OGdPictureImaging.ReleaseGdPictureImage(imageId) SavePDF = False Exit For End If Next 'Checking whether an error occurred in adding any image to the PDF document. If oGdPicturePDF.GetStat() GdPictureStatus.OK Then 'Adding the selected tiff page as a resource to a PDF document and draw it on a new page. Status = oGdPicturePDF.SaveToFile( "output.pdf")ĭim NumberOfPages As Integer = oGdPictureImaging.TiffGetPageCount(imageId)ĭim savePDF As Boolean = True 'Loop through pages. If oGdPicturePDF.GetStat() = GdPictureStatus.OK Then 'Saving the new PDF to a file. ![]() 'Adding an image as a resource and drawing it onto a new page. If status = GdPictureStatus.OK Then If oGdPictureImaging.TiffIsMultiPage(imageId) = False Then 'One-page tiff image. If oGdPictureImaging.GetStat() = GdPictureStatus.OK Then Dim status As GdPictureStatus = GdPictureStatus.OK OGdPictureImaging.TiffOpenMultiPageForWrite( False)ĭim imageId As Integer = oGdPictureImaging.CreateGdPictureImageFromFile( "Image.tif") 'Setting the option for subsequently opened multi-tiff images with read-only capabilities. Here you can benefit from using the advanced MRC compression mechanism.ĭim oGdPictureImaging As New GdPictureImaging()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |