Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. PDF to JPEG conversion in windows application?

PDF to JPEG conversion in windows application?

Scheduled Pinned Locked Moved Visual Basic
comgraphicshelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adilkazmi
    wrote on last edited by
    #1

    I have written the below code but I execte the program I am getting this error. "Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed due to the following error: 80040154." Can anyone explain me the reason for it being or if you have anyother method to change PDF to JPEG you can suggest me. Actual code: Dim doc As Acrobat.CAcroPDDoc Dim page As Acrobat.CAcroPDPage Dim pt As Acrobat.AcroPoint Dim rect As Acrobat.AcroRect Dim data As IDataObject Dim bmp As Bitmap '********************************** '*********************************** 'Test using forum code '*********************************** doc = New Acrobat.AcroPDDocClass() page = Nothing doc.Open("D:\Adil\AAA.pdf") page = doc.AcquirePage(0) pt = page.GetSize() rect = New Acrobat.AcroRect rect.Top = 0 rect.Left = 0 rect.right = pt.x rect.Left = pt.y page.CopyToClipboard(rect, 0, 0, 100) data = Clipboard.GetDataObject() bmp = data.GetData(DataFormats.Bitmap) bmp.Save("D:\Adil\AAA1.jpeg")

    adil kazmi

    C A 2 Replies Last reply
    0
    • A adilkazmi

      I have written the below code but I execte the program I am getting this error. "Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed due to the following error: 80040154." Can anyone explain me the reason for it being or if you have anyother method to change PDF to JPEG you can suggest me. Actual code: Dim doc As Acrobat.CAcroPDDoc Dim page As Acrobat.CAcroPDPage Dim pt As Acrobat.AcroPoint Dim rect As Acrobat.AcroRect Dim data As IDataObject Dim bmp As Bitmap '********************************** '*********************************** 'Test using forum code '*********************************** doc = New Acrobat.AcroPDDocClass() page = Nothing doc.Open("D:\Adil\AAA.pdf") page = doc.AcquirePage(0) pt = page.GetSize() rect = New Acrobat.AcroRect rect.Top = 0 rect.Left = 0 rect.right = pt.x rect.Left = pt.y page.CopyToClipboard(rect, 0, 0, 100) data = Clipboard.GetDataObject() bmp = data.GetData(DataFormats.Bitmap) bmp.Save("D:\Adil\AAA1.jpeg")

      adil kazmi

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      The Acrobat class copies the PDF to the clipboard as a PDF ?

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      1 Reply Last reply
      0
      • A adilkazmi

        I have written the below code but I execte the program I am getting this error. "Retrieving the COM class factory for component with CLSID {FF76CB60-2E68-101B-B02E-04021C009402} failed due to the following error: 80040154." Can anyone explain me the reason for it being or if you have anyother method to change PDF to JPEG you can suggest me. Actual code: Dim doc As Acrobat.CAcroPDDoc Dim page As Acrobat.CAcroPDPage Dim pt As Acrobat.AcroPoint Dim rect As Acrobat.AcroRect Dim data As IDataObject Dim bmp As Bitmap '********************************** '*********************************** 'Test using forum code '*********************************** doc = New Acrobat.AcroPDDocClass() page = Nothing doc.Open("D:\Adil\AAA.pdf") page = doc.AcquirePage(0) pt = page.GetSize() rect = New Acrobat.AcroRect rect.Top = 0 rect.Left = 0 rect.right = pt.x rect.Left = pt.y page.CopyToClipboard(rect, 0, 0, 100) data = Clipboard.GetDataObject() bmp = data.GetData(DataFormats.Bitmap) bmp.Save("D:\Adil\AAA1.jpeg")

        adil kazmi

        A Offline
        A Offline
        andyharman
        wrote on last edited by
        #3

        Possibly try this[^]

        If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups