On Fri, May 29, 2015 at 11:30 AM, Chris Davis <[email protected]> wrote:
> I am hoping for some kind of API which will let me do something like ...
>
> oPDF=createobject("Something.Amazing")
>
> oPDF.file="c:\mypdf.pdf"
> thisform.myimage.picture=oPDF.getthumbnail()
>
> :-)
>

Have you looked in the ProFox archives? I recommend you search on
"Adobe Reader."

I like Kevin's suggestion of creating the thumbnails yourself using
ImageMagick. It keeps you out of the embedded OLE version-madness
nightmares.

I think you're just missing a couple of lines of code there :)

In pseudo-code that will compile in no language:

DEFINE CLASS Something.Amazing AS CUSTOM
  PROCEDURE GetThumbNail (cFilename AS String)
    local lcCommandline
    lcCommandline = "c:\ImageMagick\Convert" && ... rest of commandline argument
    && which creates the thumbnails along lcPath with name lcFilename
    RUN &lcCommandline
  RETURN lcPath + lcFilename
ENDDEF

There are at least three means I can think of getting what you want:
you can automate the Adobe Reader, you can do the image conversion
yourself, or you can embed an OLE PDF reader in your page. What you
choose to do depends upon your particular circumstances, which you
haven't shared with us. If this is in-house and you can control what's
installed on machines, one choice is better. If you are redistributing
this app to many clients in many situations, perhaps another choice is
better. What you choose depends on what you need.

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cacw6n4ujwa_p_0unqy12hxfxxorafnxu4ktivo1ljcdgob9...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to