Results 1 to 9 of 9
  1. #1
    Historypaul is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    64

    Show .pdf file preview or thumbnail within a form

    I've been looking all over the place for a way to show a thumbnail or preview of a .pdf file within a form. I just want an accurate representation thumbnail of the first page for the user to click on to open the full document.



    I don't like the web browser control, because it shows all pages with scroll bars and it seems to stay on top even if I try to put a command button in front of it.

    I so far don't like the .pdf viewer active x control, either. Again - it loads the entire document with scroll bars and it stays on top - even if I try to put a command button in front of it.

    The other problem I have with both of these controls is that with a tiny preview window, if there is a .pdf signature error or other yellow message bar at the top, it fills up the entire window.

    Maybe if there's a reference for the web browser or .pdf active x control that would allow me to set the properties of scroll bars and error messages off, that would be a help, but I still don't particularly like that it's loading the entire document into memory and loading the entire acrobat viewer or web browser into memory in the background.

    Suggestions?

    One thing that came to mind is that maybe I have to generate my own thumbnail previews and store them in the folder with my documents and have a picture viewer control reference those instead of the document itself. If that's the best idea, any ideas for thumbnail generator code that I can put right into my modules so I don't have to distribute something else when distributing my software?

    The pdf's are saved in a companion folder to the database itself - not within the database. And they're saved as/referred to by the unique ID of their corresponding table entry, which is just a name, date and description of the "attachment" in case you need to know how it's structured in order to help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Thumbnail of what? What are the PDFs created from?

    Thumbnail would probably have to be a jpg or png or bmp image.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Historypaul is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    64
    Quote Originally Posted by June7 View Post
    Thumbnail of what? What are the PDFs created from?

    Thumbnail would probably have to be a jpg or png or bmp image.

    A thumbnail of the first page of the .pdf document. Some will be letter size, some will be larger, but I would just like to show a thumbnail or preview of the first page...

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Where does PDF come from? PDF of what?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Historypaul is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    64
    As an example, my database tracks contracts and pertinent information about them. The scanned .pdf of the contract is saved in a folder and linked to from the database by reference. I would like to show an icon/thumbnail/preview of the first page of that contract as a clickable control that will open the complete contract in a separate acrobat viewer window. The latter part is easy. It's the showing an icon/thumbnail/preview of the first page that's proving difficult.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    As already stated: Thumbnail would probably have to be a jpg or png or bmp image.

    So the issue is how to create those image files? When the document is scanned to PDF, also scan a jpg of the first page.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Historypaul is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    64
    A lot of these files will be existing. The user is just using the open file dialog to select the file from their computer and then I'm copying the file to the file archive with code. I do want to add the ability to create a new .pdf directly from a scanner eventually, but I'm not there yet. I've been poking around WIA and haven't found a good way to get it to scan to a pdf. It seems making the user scan the first page twice, and save it as a .jpg or even worse, making them open a pdf and create a jpg from the first page of the pdf would add more work for the user than I want to add.

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Don't see a lot of options.

    VBA code can manipulate PDF documents. I have code to create PDFs, combine PDFs, extract pages from PDFs. I think requires user to have Adobe Acrobat Standard/Professional installed, which is why I'm the only one in the office who runs this code.

    Never tried to programmatically create another image type from PDF.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Historypaul is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    64
    I have the full adobe creative suite, but I've been avoiding using the plugins - trying to stick to only reader plugins, so that everyone can use it. Scan to pdf is included with my scanner drivers, export to pdf is included in OpenOffice and almost everything else nowadays. It seems this is doable, but maybe I'm just biting off more than I can chew...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-30-2013, 10:42 PM
  2. PDF output file does not show the text as bold
    By Donothing in forum Import/Export Data
    Replies: 2
    Last Post: 10-13-2013, 11:58 AM
  3. Get an entity to not show in Print Preview
    By LukeJ Innov in forum Forms
    Replies: 1
    Last Post: 08-23-2013, 03:04 AM
  4. Save a report file without preview
    By alex__ice in forum Reports
    Replies: 2
    Last Post: 04-16-2013, 08:13 AM
  5. Open a text file to show results...
    By kkrishna in forum Programming
    Replies: 3
    Last Post: 08-13-2010, 09:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums