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ářů
Измерение осадок производятся до условной стабилизации деформаций (затухание осадки). Несущая способность сваи определяется по результатам нагружения свай усилием, предусмотренным программой испытаний или до значения нагрузки, при которой значение осадки составит регламентируемую величину https://www.osnovanie-svai.com/politica.html
Например, в ряде случаев 40 мм https://osnovanie-svai.com/
Полевые испытания грунтов сваями при инженерных изысканиях для строительства https://osnovanie-svai.com/pile.php
Полевые контрольные испытания свай при строительстве (реконструкции) на соответствие расчетным нагрузкам https://www.osnovanie-svai.com/politica.html
Испытание свай нагрузкой https://osnovanie-svai.com/pile.php
Нагрузки в зданиях и сооружениях делятся на вертикальные, горизонтальные и продольные https://osnovanie-svai.com/pile.php
Вертикальные нагрузки состоят из постоянной, динамической и ударной нагрузок https://osnovanie-svai.com/
Горизонтальные нагрузки состоят из ветровой и сейсмической нагрузок https://www.osnovanie-svai.com/politica.html
Продольные нагрузки, т https://osnovanie-svai.com/
е https://osnovanie-svai.com/pile.php
тяговые и тормозные силы, учитываются в особых случаях проектирования https://www.osnovanie-svai.com/politica.html
В соответствие с ГОСТ 5686-2020 Грунты https://osnovanie-svai.com/pile.php
Методы полевых испытаний сваями испытания свай статическими нагрузками проводят для решения следующих задач:
Расстояние от оси испытываемой натурной сваи до анкерной сваи или до ближайшей опоры грузовой платформы, а также до опор реперной установки должно быть не менее пяти наибольших размеров поперечного сечения сваи (диаметром до 800 мм), но не менее 2 м https://www.osnovanie-svai.com/politica.html
При контрольных испытаниях свай это расстояние должно быть не менее 3d, но не менее 1,5 м (d — диаметр или наибольшая сторона поперечного сечения сваи). Для эталонной сваи или сваи-зонда расстояние должно быть не менее 1 м https://www.osnovanie-svai.com/politica.html
Динамические испытания свай https://osnovanie-svai.com/pile.php
https://moneyfx.boardhost.com/viewtopic.php?pid=45693#p45693
(AlvinDyern, 14. 11. 2025 17:13)Go to our website now — https://www.mecabricks.com/en/forum/topic/74114
Up to break off loli
(Jamesseila, 14. 11. 2025 6:01)
Throng minus loli po**rn
afpo.eu/357
go.euserv.org/1as
Brash loli
(Marionamugs, 14. 11. 2025 1:26)
… la technique loli
https://afpo.eu/357
https://go.euserv.org/1as
Go to our website:
(JamesKat, 13. 11. 2025 14:18)Visit our main website — https://madguy.ru/
Latest loli
(TerryMen, 12. 11. 2025 15:04)
Unripe loli por*n
afpo.eu/999
go.euserv.org/1ao
Latest loli
(Michaelexted, 11. 11. 2025 19:38)
Unworldly loli po^rn
afpo.eu/999
go.euserv.org/1ao
Fine loli
(Williamhep, 11. 11. 2025 7:18)
Made-up loli p^orn
afpo.eu/999
go.euserv.org/1ao
https://beautygocams.com/
(Davidkex, 11. 11. 2025 5:48)Here’s what’s new — https://beautygocams.com/
Быстрый и качественный ремонт авто — автосервис «5 Бокс»
(Mikphife, 10. 11. 2025 22:34)Автосервис «5 Бокс» — это профессиональный ремонт автомобилей https://auto-5-box.ru отечественных и иностранных марок. Проводим диагностику, ремонт двигателя, подвески, тормозной системы, рулевого управления и автоэлектрики. Выполняем замену масел, фильтров, ремней ГРМ, обслуживаем кондиционеры. Современное оборудование позволяет точно определить неисправность и устранить её быстро и качественно. Используем оригинальные и проверенные запчасти. Гарантируем прозрачные цены и честную работу. Приезжайте в «5 Бокс» — восстановим надёжность и комфорт вашего автомобиля.
Different loli
(Darryllig, 10. 11. 2025 13:54)
Discrepant loli porn
afpo.eu/999
go.euserv.org/1ao
chemical696.asia
(JamesTup, 10. 11. 2025 4:47)https://chemical696.asia/ - now back on new domain! welcome chemical696
Unconventional loli
(Rolandgaf, 9. 11. 2025 11:11)
In dernier cri loli po*rn
afpo.eu/999
go.euserv.org/1ao
Mod loli
(Randykib, 8. 11. 2025 17:38)
Late-model loli por*n
afpo.eu/999
go.euserv.org/1ao
orb11ta.help
(EdwardThulk, 6. 11. 2025 18:11)https://orb11ta.help/ now go on!!! orb11ta.help orb11ta
Досуг Балашиша
(DamonRek, 5. 11. 2025 0:23)
Вызвать шлюху в Балашихе: Эксклюзивные модели по вашему выбору
Информацию можно узнать здесь: https://shluhi-balashiha.ru/
Плиты Шпонированные
(Gabrielnor, 4. 11. 2025 12:30)
Кромка из шпона от 50 руб./рулон https://evroshpon.ru/magazin/product/532604851
Kredyt we frankach
(Wybielanieped, 2. 11. 2025 23:12)
Hey, just wanted to say a whacking big thanks as a replacement for your wondrous plea!
I really valuable the chance and essay you stow into review such a sparkling and particularized response. You explained the aggregate in a path that in actuality makes brains, and I ended up culture way more than I expected. It’s not again you give up across such a productive and well-thought-out answer, so I reasonable wanted to take in you be acquainted with it didn’t go unnoticed.
The examples and tips you shared were super helpful, and I’m undeviating this wishes succour a lot of other people who come across this drift too. It’s great to behold people like you fascinating the all at once to allocate your consciousness and facilitate others out.
Also, amuse by my instal: https://higieniajamyustnej.pl/ Thanks again for the treatment of being so benevolent with your beat and adroitness — in effect regard highly it!
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
Срубки Оголовков Свай
(Edwardpauro, 21. 11. 2025 11:48)