![]() 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 ![]() 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() You can compare it with another approach by converting page by page using images through the GdPictureImaging class.Status: " + status.ToString(), "TIFF to PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Error) MessageBox.Show( "The file has failed to load. MessageBox.Show( "The file has failed to save. MessageBox.Show( "The file has been saved successfully.", "TIFF to PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Information) Status = oConverter.SaveAsPDF( "output.pdf", PdfConformance.PDF) MessageBox.Show( "The file has been loaded successfully.", "TIFF to PDF Example", MessageBoxButtons.OK, MessageBoxIcon.Information) GdPictureStatus status = oConverter.LoadFromFile( "input.tif", ) Using (GdPictureDocumentConverter oConverter = new GdPictureDocumentConverter()) We assume that GdPicture has been correctly installed and unlocked. Using oConverter As GdPictureDocumentConverter = New GdPictureDocumentConverter()ĭim status As GdPictureStatus = oConverter.LoadFromFile( "input.tif", ) 'We assume that GdPicture has been correctly installed and unlocked.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |