Link to home
Start Free TrialLog in
Avatar of Shawn
ShawnFlag for Canada

asked on

previewing images and PDFs

I have I little database that stores the filepaths and filenames of JPGs and PDFs. I would like to be able to preview (similar to a thumbnail) the first page of the image.

How could I do this?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

In a form insert a web browser control.

On the current event of the form use code like this:

Me.WebBrowser.Navigate YourFieldThatStoresThePatheToThePDFOrImage


So if your field that stores the Path to the PDF/Image is called "DocPath",
Your code would be:
Me.WebBrowser.Navigate DocPath
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shawn

ASKER

thank you...will test and get back to you
Avatar of Shawn

ASKER

wow, works nicely.
Is there a way to control the zoom?
.... and in the PDF file it shows the menus at top..can I hide them?
<Is there a way to control the zoom?>
No, not unless you want to go so far as adjusting the size of the webbrowser control itself, (and this can get messy)
So the best you can do is make the webbrowser control as big as will fit within the borders of the form.

<and in the PDF file it shows the menus at top..can I hide them?>
No, ...you can only do this if the PDF is opened independently

JeffCoachman
Avatar of Shawn

ASKER

thanks Jeff, kinda what I thought but just checking
Avatar of Shawn

ASKER

i just put up another question if you have a minute Q_27247608