PDF thumbnails from VBA
I was asked to develop a form where user can see a pdf thumbnail of a pdf file. It was pretty far from what I have been developing so I decided to use "uncle" google to find a solution. There are some solutions but nothing what was expecting. You can use paid version of Adobe or free Adobe Acrobat ActiveX (Acropdf1) or some others free tools that can work along a pdf file. I tested only the free version of Acrobat ActiveX component and it was really nightmare. Then I found a C# project using the GhostScript tool for creating a pdf thumbnail. Unfortunatelly VBA cannot work with this project directly. Read more to find solution.
As I mentioned you can use the Acropdf1 activeX which is automatically installed with the Adobe Reader application.

How to add the Acropdf1 activeX on a VBA form
At the first time the activeX seemed to be a good solution but then I found two "bugs". The first one is more important than the second one. The activeX takes focus and never give it back and if you press the "TAB" key, then the whole application will crash. It's very known bug but Adobe cannot fix it for some reason. And the second bug rather behavior - of the activeX control is uncomfortable - it always takes focus and never give it back and also you don't have option to find out if a pdf document is fully loaded or not. My client was complaining about that for many times so I decided to find another solution.
I found code from Matthew Ephraim. where he uses a free tool Ghostscrip and .NETFramework 3.5 and C#. Form Visual Studio you can use his tool without any problems just include it into your project. Unfortunately we cannot use his dll directly from VBA. That was the reason why I took his code and made a little adjustment to expose methods from his project to the COM object.
Now - after registration the dll to your system - you can reference the dll as usually and use it !!! And it works great.

Who is interested how to create a C# dll that can work with VBA I attached the zip file with entire C# solution. Look at the Attachment section.
And who just want to use it as soon as possible, download the installer and install it. I also prepare a sample and you can find everything in the Attachment section.
The installer just check if your system contains the .NETFramework 4 and if not, it will suggest to download it and then register the dlls into your system.
Your code can look like this one
and then you can take the output file as an ordinary image file and load it - for example - to an image control.
Option Explicit
'********************************************************************************
'TestPDFThumbnailGeneration
'
' Purpose: It uses reference to GhostscriptWrapper library.
' From a pdf file creates a jpg file that represents a thumbnail of the pdf.
' You can set page number and DPI quality.
'
' Inputs: -none-
'
' Outputs: -none-
'
' Created: 02/10/2011 Premysl Lazecky
'
' Modified: .
'
'********************************************************************************
Sub TestPDFThumbnailGeneration()
Dim PDF As GhostscriptWrapper
Dim strPath As String
Dim strInputFile As String
strInputFile = "Test.pdf"
strPath = ActiveWorkbook.Path
If Right$(strPath, 1) <> Application.PathSeparator Then
strPath = strPath & Application.PathSeparator
End If
Set PDF = New GhostscriptWrapper
PDF.GeneratePDFThumb inputPath:=strPath & strInputFile, _
outputPath:=strPath & "Output.jpg", _
Page:=1, _
Width:=72, Height:=72
Set PDF = Nothing
End Sub
As the result of this code you will get a jpg file called Output.jpg with thumbnail of defined page in the pdf file - in this case page 1 - with defined resolution.
Attachments
Installer and sample files
C# project
Komentáře
Přehled komentářů
<b>Imagine</b> coming home to find leak creeping into the corners of your home and cherished spaces.
<b>It’s overwhelming</b> — but you don’t need to handle it by yourself.
<b>We’re here to save</b> your home and your family’s comfort, working swiftly and safely to limit harm before it spreads. Our team works with respect and caution, bringing back both your home and your calm.
<b>We help you</b> prevent mold and lasting problems, ensuring a healthier space for your loved ones. And with our day-and-night assistance, you’re always supported through emergencies — we’re here whenever you need us!
<b><u>Call - 8338561951 and professionals will help you!</u></b>
Ремонт стиральных машин
(ThomasUtilk, 17. 9. 2025 17:28)Профессиональный и срочный ремонт стиральных машин любой марки на дому https://vk.com/spb_remont_stiralnih_mashin
Качественное строительство загородных домов в СПб – коттеджи, дачи, бани
(Denflabe, 17. 9. 2025 16:51)
Строим дома из газобетона, кирпича, пеноблоков в Санкт-Петербурге и области. Наша строительная компания предлагает полный комплекс услуг: от разработки проекта и расчета сметы до сдачи готового объекта. Прайс составляется заранее, чтобы заказчик мог полагать на точную стоимость строительства.
Выполняем кладочные работы любой сложности, устанавливаем перегородки, перекрытия ЖБ, занимаемся отделкой фасадов и внутренних помещений. Наша бригада умеет делать облицовку кирпичом https://builder-spb.ru , штукатурку, поклейку обоев. В каталоге представлены фото готовых домов, построенных с учетом современных технологий. Гарантируем качество на каждом этапе и доступные цены.
Кошелек для USDT
(LloydOvaxy, 14. 9. 2025 12:23)
1. Лучший кошелек для USDT — это безопасность и удобство
Выберите кошелек для USDT, который сочетает в себе высокую степень безопасности и простоту использования. Современные кошельки позволяют хранить ваши средства под надежной защитой, а удобный интерфейс обеспечит мгновенный доступ к вашим активам в любой момент. Защитите свои инвестиции с лучшими решениями для хранения USDT. https://sitebs.ru/blogs/116719.html
2. Храните свои средства в надежном кошельке для USDT
Ваши средства заслуживают лучшей защиты. Кошельки для USDT обеспечат вам максимальную безопасность с функциями двухфакторной аутентификации и шифрования данных. Воспользуйтесь возможностью быть уверенным в сохранности своих активов. https://rentry.co/cryptokreditru
3. USDT кошелек для серьезных инвесторов
Для серьезных инвесторов важно выбрать кошелек с возможностью управления крупными суммами. Наши рекомендуемые кошельки для USDT предлагают высочайшую степень безопасности, поддержку нескольких блокчейнов и удобство управления активами на одном устройстве. https://tawk.to/cryptokreditru1
4. Простой выбор для хранения USDT — выбирайте надежность
Не тратьте время на поиски! Выберите лучший кошелек для USDT, который соответствует всем вашим требованиям. Простота, скорость и высокая безопасность — вот что нужно для эффективного управления криптовалютными активами. https://yoo.rs/usdt-1757792363?Ysid=285574
5. Топ-5 кошельков для USDT: доверяйте лучшим решениям
Мы подобрали для вас топ-5 кошельков, которые обеспечат вам надежное и безопасное хранение USDT. Эти кошельки гарантируют защиту ваших активов и обеспечивают удобный доступ к средствам, где бы вы ни находились. https://subscribe.ru/group/hi-tech-novosti-vyisokih-tehnologij/19203221/
Дом из газобетона или кирпича под ключ – строительство в СПб, расчет стоимости работ
(Makphano, 12. 9. 2025 11:07)Наша компания занимается строительством загородных домов в Санкт-Петербурге и области. Мы реализуем проекты любой сложности – от небольших дачных домов до больших коттеджей с бассейнами и гаражами. Работы выполняются профессиональными мастерами с использованием современного строительного оборудования. Предлагаем строительство из кирпича https://stoimsya.ru , газобетона, дерева и комбинированных материалов. Разрабатываем индивидуальные проекты с учетом ваших пожеланий. В нашем прайсе – доступные расценки, стоимость фиксируется в договоре. Мы предоставляем услуги «под ключ» и берем на себя все заботы по стройке. Наша цель – создать комфортное и надежное жилье для вашей семьи. Звоните – обсудим проект и рассчитаем стоимость бесплатно.
Latest video update now online
(RobertSlogs, 11. 9. 2025 22:40)
Our newest video text is finish and ready seeking you to explore. In this update, we’ve added brazen supplies to persist in things mind-boggling and engaging. https://gay0day.com/categories/blowjob/
Click by to take the latest release, share your thoughts, and buttress tuned in place of round more updates coming soon. This is the better possibility risk to catch up on what’s unexplored and endure high-quality tranquillity, available online anytime.
Investigation, very recently Lucky Games evaluation..
(GeorgeBlise, 11. 9. 2025 1:53)https://luckyminigames.live
301 Moved Permanently
(Thomasferve, 1. 9. 2025 4:53)
Hot & trending: Viral 'Magumba' TikTok dance, Kamo Mphela 'Partii' challenge, 'Schedule 1' indie game, 'Hakla SRK' meme, Echo Auto, Apple Watch Ultra 2, Stranger Things S5
https://test.rusosky.com/ - 301 Moved Permanently>>>
Южный Парк онлайн смотреть лучшие
(RaminDDiush, 31. 8. 2025 2:19)
Всем привет!
Меня зовут Савелий и я обожаю смотреть онлайн мультсериал Южный Парк на сайте https://southpark-online.info
Там много интересных серий, которые Вам понравятся.
Присоединяйтесь!
Fast proxies for automation - 13087list
(PrivateProxyo, 29. 8. 2025 16:59)Working with Xrumer? https://proxyka.com offers private proxies specially for SEO campaigns.
где ставят апостиль на свидетельство о рождении
(TimothyKed, 29. 8. 2025 15:59)
Апостиль на документы для международного арбитража в Самаре. Заверение доказательств, контрактов, экспертных заключений. Соблюдаем процессуальные нормы.
Source:
- https://postavit-apostil.ru
где ставят апостиль на свидетельство о рождении
anime store 2027
(RobertLer, 24. 8. 2025 14:54)Cмотреть аниме онлайн https://anime2027.store/
anime from 2027
(RobertLer, 24. 8. 2025 13:02)Cмотреть аниме онлайн https://animeserial2026.ru/
turkyserial2026
(RobertLer, 24. 8. 2025 6:47)Смотреть турецкие сериалы онлайн https://turkyserial2026.ru/
Proxies for ads - 10280ip
(PrivateProxyq, 23. 8. 2025 21:18)Looking for proxies for social media? Check out Wingate — fast proxies for Instagram, TikTok, Facebook, etc..
Вход на КРАКЕН: Официальный сайт Кракен: kr38.shop
(Darrenzew, 22. 8. 2025 10:07)
Самые актуальные ссылки на Кракен Маркетплейс на август 2025:
Зеркало 1: https://kr38.shop
Зеркало 2: https://captcha-kra37.cc
Только надёжные и рабочие ссылки для входа на Кракен.
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58
Discover how to learn faster even if you productivity
(DanielTooff, 20. 9. 2025 1:36)