Results 1 to 7 of 7

Thread: [RESOLVED] How to import a .PDF picture file into a VB6 picture box using VB6 code

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Resolved [RESOLVED] How to import a .PDF picture file into a VB6 picture box using VB6 code

    The LOADPICTURE function is great for importing .jpg or .bmp image files into a VB picture box.

    How can a similar function be achieved for image files in the .pdf format?

    Suggestions / pointers would be appreciated please.


    camoore

    Wales, UK

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    You could use the Adobe Acrobat Browser Control
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Thank you jggtz. Could you possibly give me a simple VB6 code example of using this control to get me started?

    I will be concerned with keeping the aspect ratio of the image correct, if possible, and also with being able to rotate the image through 90 degrees either prior to or after its introduction into a picture box.

    Once I have the image in a picture box, I will be carrying out some functions upon it and eventually saving it as .bmp or .jpg. All these features are up and running. I just need to find out how to import the .pdf picture into a picture box in the first place.

    camoore

    Wales, UK

  4. #4
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Here's a lot, google vb6 & Adobe Acrobat Browser Control
    http://www.google.com.mx/#hl=es-419&...066f923410c888
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Thank you jggtz for the Google pointers. Thanks to this I found an EXCELLENT VB6 tutorial and specimen code at :

    http://www.planet-source-code.com/vb...69282&lngWId=1

    This was written by Mr. Julius Earvin Enero in 2007. His VB6 code is comprehensively commented and serves for exactly what I wanted - how to get started with importing .PDF image files into a VB6 picture box. I thoroughly commend this tutorial to all interested parties, and please pass favourable credit to Julius, as I have done.

    THis has got me to the stage of being able to import a .PDF image file into a picture box. My remaining problem is how to rotate the picture box, because my images arrive as portrait but I need to view them as landscape.

    If you have any ideas about this, they would be appreciated. Meanwhile I am back on the forum and web looking for a rotation solution.

    Again I commend the above quoted URL to anyone wanting to understand how to import .PDF images into a VB6 picture box.

    Please note that the routine requires Adobe Acrobat V7.0 or later, so it is unlikely to work with pre-Win2000 machines.

    camoore

    Wales, UK

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Thank you jggtz for the Google pointers. Thanks to this I found an EXCELLENT VB6 tutorial and specimen code at :

    http://www.planet-source-code.com/vb...69282&lngWId=1

    This was written by Mr. Julius Earvin Enero in 2007. His VB6 code is comprehensively commented and serves for exactly what I wanted - how to get started with importing .PDF image files into a VB6 picture box. I thoroughly commend this tutorial to all interested parties, and please pass favourable credit to Julius, as I have done.

    THis has got me to the stage of being able to import a .PDF image file into a picture box. My remaining problem is how to rotate the picture box, because my images arrive as portrait but I need to view them as landscape.

    If you have any ideas about this, they would be appreciated. Meanwhile I am back on the forum and web looking for a rotation solution.

    Again I commend the above quoted URL to anyone wanting to understand how to import .PDF images into a VB6 picture box.

    Please note that the routine requires Adobe Acrobat V7.0 or later, so it is unlikely to work with pre-Win2000 machines.

    camoore

    Wales, UK

  7. #7
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Maybe the solution is in Planet source again
    http://www.planet-source-code.com/vb...25764&lngWId=1
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    403

    Re: How to import a .PDF picture file into a VB6 picture box using VB6 code

    Apologies for some delay in my further reply.

    The code above mentioned proved excellent for displaying on screen a .PDF format image with the facility then to rotate it and/or to zoom into parts of it. That was just what I wanted.

    However while the image thus could be contained within a picture box, it was not actually properly written into the picture box.

    So saving the picture box (eg. by SAVEPICTURE) did not save the .PDF image.

    The solution I found was based on a screenshot program in VB6 posted as open source on Planet. I attach this code as a .zip. This program allows the placing of a variable sized capture window over any part of the screen and the "capture" of that area into a picture box proper and/or as a .jpg or .bmp file.

    I was able to adapt this code quite easily to integrate with my project.

    I will mark this thread as resolved. vmt to jggtz for those helpful pointers.

    camoore
    Wales, UK
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width