![]() While running the application, error throwing at this line My application needs to convert pdf to tiff and I used your code. In project, to add reference, I selected Adobe Acrobat library8.0 from the COM tab of Addreference window. PDDoc.Open("C:\Test.pdf" ) ' Path of some PDF you want to open ![]() JSObj.SaveAs( "C:\TestTiffs\TestGood.tif", "" ) ' For TIFF output the correct cConvid is "" StrPDFText = JSObj.GetField( "Text2.0.0.2.0" ).value Auto convert tiff to pdf adobe windows#' Test pulling data from a PDF text field and showing in a Windows Messagebox ' Syntax for GetField method GetField( strFieldName ) ' Test making change to one of the text fields ' Hide Acrobat application so everything is done in silent mode Private Sub btnLoadPDF_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadPDF.Clickĭim JSObj As Object, strPDFText As String txtPDFPath.Text = OpenFileDialog1.FileName OpenFileDialog1.InitialDirectory = "DeskTop" OpenFileDialog1.Filter = "Adobe PDF Files (*.PDF) | *.PDF" Private Sub btnBrowsePath_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowsePath.Click Private static ImageCodecInfo GetEncoderInfo(String mimeType)Įncoders = ImageCodecInfo.GetImageEncoders() Logger.Write("ImageUtility", "EXITING ConvertImage method") Read the new image into a byte variable MemoryStream newImage = new MemoryStream() īitmap.Save( newImage, codecInfo, encoderParams ) ImageCodecInfo codecInfo = GetEncoderInfo( mimeType ) ![]() Image image = Image.FromStream( fromImageStream, true ) ĮncoderParameters encoderParams = new EncoderParameters() ĮncoderParams.Param = new EncoderParameter( Encoder.Quality, 50L ) MemoryStream fromImageStream = new MemoryStream() įromImageStream.Write(fromImage, 0, fromImage.Length) Read the image from the byte variable into a bitmap variable Public static byte ConvertImage(byte fromImage, string mimeType)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |