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ářů
darknet site https://github.com/nexusmarketlinkldsd8/nexusmarketlink darkmarket list
Куплю Мебель Прихожие
(RalphNam, 17. 5. 2025 10:49)
Такой вариант возможен! Направьте эскиз на нашу электронную почту: sales@deshevaya-mebel https://shkafi-kuhni.ru/
ru, дополнительно указав в письме материал фасадов, комплектацию, габаритные размеры https://shkafi-kuhni.ru/page33376460.html
Мы предоставим расчет в ответном письме https://shkafi-kuhni.ru/page33375328.html
Или приезжайте в наши шоу-румы, в них сделаете расчет на месте, параллельно выберите материалы https://shkafi-kuhni.ru/page33376464.html
от 64 292 р https://shkafi-kuhni.ru/page33376461.html
за 1м https://shkafi-kuhni.ru/page33375319.html
пог https://shkafi-kuhni.ru/page33376460.html
*в базовой комплектации https://shkafi-kuhni.ru/page33376461.html
Это не просто визуализация картинки будущей обстановки, это сложная проектная разработка, от точной проработки которой зависит весь функционал интерьера https://shkafi-kuhni.ru/page33375328.html
Дизайн-проект мебели, созданный руками наших профессионалов, основан на предпочтениях клиента, его стиле жизни https://shkafi-kuhni.ru/page33461085.html
Задач у дизайнера несколько: грамотно организовать пространство, подобрать сочетающиеся по фактуре, стилю и цвету материалы, продумать все коммуникации, при этом учесть все пожелания заказчика https://shkafi-kuhni.ru/page33376461.html
Доступность 24/7 https://shkafi-kuhni.ru/page33375319.html
Сотрудничество с постоянными партнерами и поставщиками, проверенными временем Использование высокопроизводительного оборудования Применение экологически чистых и безопасных материалов Строгий контроль производственного процесса https://shkafi-kuhni.ru/page33375328.html
Мебель на заказ – индивидуальность и комфорт https://shkafi-kuhni.ru/page33376464.html
Bs2best
(Juanitakib, 15. 5. 2025 20:33)
Blacksprut (часто пишется как Black Sprut, блэкспрут или блекспрут) — это одна из крупнейших и наиболее известных торговых платформ в даркнете. Площадка предоставляет пользователям доступ к широкому ассортименту товаров и услуг, включая цифровые продукты, специализированные инструменты, редкие позиции и многое другое.
Сайт функционирует через систему зеркал Blacksprut, позволяя обойти любые блокировки и получить стабильный доступ из любой точки мира. Благодаря удобному интерфейсу, высокой скорости работы и строгим мерам безопасности, Blacksprut заслуженно занимает лидирующие позиции среди darknet-площадок.
https://b2sbest.at
bs2best
bs2best at
bs2site
blacksprut
bs2site at
https bs2best at
https bs2site at
блекспрут
blacksprut ссылка
blacksprut com
blacksprut зеркала
blacksprut зеркало
blacksprut сайт
bs blacksprut
тор blacksprut
blacksprut официальный
bs2best at ссылка
tor blacksprut
blacksprut ссылка tor
blacksprut darknet
blacksprut сайт зеркало
blacksprut bs2tor nl
bs2site at ссылка
blacksprut blacksprut click
blacksprut официальный сайт
блекспрут bs2tor nl
рабочая blacksprut
blacksprut ссылка тор
bs2web
blacksprut com зеркало сайта
blacksprut вход
https bs2site at login
blacksprut onion
blacksprut com ссылка
как зайти на blacksprut
тор браузер blacksprut
blacksprut сегодня
ссылка на блекспрут
блекспрут сайт
blacksprut официальная ссылка
blacksprut актуальные
blacksprut ссылка bs2tor nl
блекспрут зеркало
блекспрут blacksprut
http blacksprut ссылки
blacksprut зеркало официальный
bs2web at
bs2site at не работает
blacksprut не работает
blacksprut ссылка зеркало
2fa blacksprut где взять
blacksprut зеркала tor
блэкспрут blacksprut
блекспрут com
blacksprut площадки
блекспрут blacksprut click
bs2site at зеркала
блекспрут bs2
blacksprut com официальный
blacksprut официальный сайт ссылка
blacksprut onion ссылка
блэкспрут blacksprut click
актуальная ссылка на blacksprut
bs2best at зеркала
как найти blacksprut
блекспрут 2fa
bs2best at бс сайт
bs2best at не работает
blacksprut ссылка на сайт
блэк спрут blacksprut click
blacksprut зеркала bs2tor nl
тор блекспрут
зеркало blacksprut darknet
bs2web run
blacksprut зеркало официальный сайт
как зайти на сайт blacksprut
blacksprut com вход
блекспрут вход
bs2web top
рабочее зеркало blacksprut
https bs2site at сайт
как зайти на блекспрут
как зайти через blacksprut
bs2best at регистрация
blacksprut поддержка
blacksprut onion зеркало
blacksprut com официальный сайт
blacksprut зеркала актуальные
bs2web nl
рабочая ссылка на blacksprut
blacksprut рулетка
bs2besd at
рабочая ссылка блекспрут
https bs2best at сайт
блекспрут официальный сайт
ссылка блекспрут тор
bs2web com
blacksprut онион
блекспрут бс сайт bs site biz
блекспрут bs2web
блекспрут com ссылка
blacksprut официальный bs site biz
blacksprut площадка зеркало
блекспрут онион
блекспрут актуальные ссылки
blacksprut войти
blacksprut зеркало работающее
blacksprut сайт bs2 best at
http blacksprut onion
блекспрут надежные ссылки
ссылка на блекспрут bs site biz
сайт блекспрут ссылки
blacksprut net официальный сайт
https bs2best at не работает
bs2web зеркало
блекспруте blacksprut me
как открыть ссылку bs2web at
Досуг и отдых
(MartyroG, 12. 5. 2025 22:33)
Здравствуйте!
Обычно не верю в сайты с «интимным уклоном», но в этот раз реально удивился. Девушка сама первой написала, причём без всяких роботов и фейков. Поболтали, договорились — и всё по кайфу. Без лишней воды. Вот тот самый сайт, может кому зайдёт: https://institutsexa.ru
Автоматика На Распашные Ворота
(DavidNoums, 11. 5. 2025 16:31)
Чтобы автоматическое управление функционированием створок происходило надёжно, все устройства нужно отладить и проверить вручную https://mosvrata.ru/tovar/nice-too-4500-klt-ru01-privod-dlya-raspashnyh-vorot/
Данные работы выполняются на завершающей стадии строительных работ https://mosvrata.ru/tovar/nice-too-4500-klt-ru01-privod-dlya-raspashnyh-vorot/
Автоматические механизмы могут работать:
Полезный совет! Используйте в качестве обшивки любые понравившиеся материалы https://mosvrata.ru/catalog/avtomatika-dlya-vorot/raspashnyh/
Для отделки распашных ворот может быть использована сварная решетка, древесина, профилированный лист https://mosvrata.ru/tovar/faac-h800-stainless-bollard-gidravlicheskij/
Телескопические https://mosvrata.ru/tovar/ctv-dp2700-dax-w/
Элементы разделяются на секции https://mosvrata.ru/tovar/came-cgz6-rejka-zubchataya-1-m/
Конструкция состоит из внутренних ползунков, которые обеспечивают раздвижение секций для передвижения конечного держателя https://mosvrata.ru/tovar/obogrevatel-dlya-privodov-universalnyj-120w/
Телескопический привод автоматических ворот
Специалисты рекомендуют подбирать все вышеперечисленные критерии максимально точно, лишь мощность можно выбирать немного с запасом чтобы её было точно достаточно https://mosvrata.ru/tovar/alutech-rolik-hodovoj-2/
Учитывая массу и инерцию конструкции, для привода создали блок управления B460 FU, который обеспечивает плавный точный пуск и плавную остановку https://mosvrata.ru/tovar/doorhan-dhre-2-radiopriemnik/
Это продлит срок службы самих ворот, приводов, зубчатой рейки и комплекта роликов https://mosvrata.ru/catalog/page/19/
Чтобы сделать верный выбор, необходимо для начала определиться с тем, какой компании можно доверить автоматизацию своего дома или целого предприятия https://mosvrata.ru/tovar/antenna-came-dd-1ta868/
И выбор должен пасть на тех, кто работает на рынке не первый десяток лет, чьи инновации и решения значительно опережают конкурентов, кто постоянно работает над повышением качества своей продукции https://mosvrata.ru/catalog/shlagbaumy/avtomaticheskie/page/7/
Вот уже на протяжении многих лет неоспоримым лидером на рынке является автоматика для ворот от BFT https://mosvrata.ru/catalog/pulty/page/3/
Milan tourism
(Jamesbox, 11. 5. 2025 15:34)
Get to know your city from a different angle! On the page "A More Personal Way to Discover the City," you will find personal stories and experiences from those who truly love their place. Discover unnoticed gems, unconventional routes, and feel the pulse of city life. Join this exciting journey that will change your view of the city!
Complete information here: https://homeposts.net/a-more-personal-way-to-discover-the-city.html
Закупить Оборудование В Китае
(Jamestuh, 11. 5. 2025 12:55)
Налаживайте с партнером личные отношения https://vm.partners/services/manufacturing-outsourcing/purchase/elektrokomponent
Поздравления с праздниками, проявления простого, но ненавязчивого человеческого участия, периодические деловые визиты – все это поможет укрепить ваши бизнес-связи https://vm.partners/services/logistics/rail-delivery
Общаются китайцы преимущественно в мессенджере WeChat, установите его на свой смартфон https://vm.partners/services/manufacturing-outsourcing/control
Товары теряют и повреждают во время доставки https://vm.partners/case/proizvodstvo-i-dostavka-kozlovogo-krana-dlya-sk-most
В случае пропажи товара компенсация по страховке с добавленной стоимостью достигает до $100 за 1 кг https://vm.partners/services/manufacturing-outsourcing/purchase/elektrokomponent
На бой товара (повреждение) во время доставки страховка не распространяется https://vm.partners/actual/chinese-company
Нужно учитывать, что хрупкие товары могут быть повреждены https://vm.partners/actual/vazhnost-soglasovaniya-metodik-priemki-oborudovaniya
Компенсации за это нет https://vm.partners/services/insurance/
Как проверять партнеров?
Поиск поставщика https://vm.partners/services/manufacturing-outsourcing/china-agent
Китайцы гораздо лучше относятся к заказчикам, с которыми знакомы лично, чем к тем, с кем общаются только по переписке https://vm.partners/actual/poryadok-sertifikatsii-importnoj-produktsii-v-rossii
Поэтому, если вы хотите стабильной и долгосрочной работы, лучше отправляться налаживать связи с поставщиками непосредственно в Китай https://vm.partners/actual/preimushhestva-nalichiya-litsenzij-v-knr
Ведущие трейдинговые онлайн-платформы на китайском языке:
Как понять, что бизнес не выстрелит? Есть два фактора, по которым можно определить, что бизнес-модель нерабочая https://vm.partners/services/customs-clearance
Первый — остановился рост продаж https://vm.partners/case/fito-sanitar-control
Например, продавец находился в топ-5 выдачи на маркетплейсе, но потом другие продавцы начали демпинговать и выжимать его с лидерских позиций https://vm.partners/actual/5-sovetov-turistu
Если продавец при этом не видит способов, которые могли бы ему помочь удержаться в топе, его бизнес-модель неэффективна https://vm.partners/case/za-odin-den-do-kitajskih-prazdnikov
Скорее всего, бизнес неразумно тратит деньги на маркетинг или закупает товары по невыгодной цене https://vm.partners/actual/pochemu-dazhe-krupnye-kompanii-polzuyutsya-autsorsingom
Дом Интернет Подключить
(AlfredoSuigo, 9. 5. 2025 11:07)
Идёт обработка запроса, подождите секундочку https://sevtele.com/
Интернет 100 Мбит/с: 400 руб./мес https://sevtele.com/
Интернет + ТВ: 1100 руб./мес https://sevtele.com/
Идёт обработка запроса, подождите секундочку https://sevtele.com/
1 https://sevtele.com/
Как выбрать лучшего интернет-провайдера в Иркутске?
для дома 100 от билайн https://sevtele.com/
— автономность от вышек связи или другого оборудования;
Интернет Магазине Профессиональной Косметики
(DuaneLox, 8. 5. 2025 18:03)
Берегите себя и свою кожу https://sinapple.ru/collection/juliette-armand/product/juliette-armand-elements-hydra-repairing-cream Ведь она у вас одна на всю жизнь, и заслуживает уважения и заботы https://sinapple.ru/collection/brendy
мфо пенсионерам небольшой займ
(RuszaiKaH, 5. 5. 2025 13:06)Прошлое не должно мешать настоящему. На https://toolbarqueries.google.pl/url?q=https://ruszaim.com/ тебя ждёт подборка МФО, которым неважна твоя кредитная история. Главное — паспорт и доступ в интернет. Мгновенное решение, моментальная выдача на карту. Помогаем тем, кому другие отказывают. Попробуй — и сам удивишься, как просто всё работает.
Уборка квартир в СПб
(CarterPag, 2. 5. 2025 22:48)Уборка квартир в СПб! Забудьте о быте, наслаждайтесь чистотой. Мастерски, оперативно, недорого. Оставьте заявку сегодня! Переходите https://uborka-kvartir24top.ru - СПб клининговые компании
Клининговая компания СПб уборка квартир
(CarterPag, 2. 5. 2025 15:01)Уборка квартир в культурной столице! Забудьте о быте, окунитесь в свежесть. Мастерски, оперативно, по разумной цене. Закажите сейчас! Перемещайтесь к https://uborka-kvartir24top.ru
Get in touch
(DanielTooff, 29. 4. 2025 17:14)
World harmony is a shared aim, yet it remains distant. Disputes, financial disruption, and poverty threaten security. Partnership among countries, equitable policies, and trust can create a secure tomorrow.
https://handtohandcombat4all.blogspot.com/2025/04/hand-to-hand-combat.html
Exploring the Miraculous of Dating: Connections, Growth, and Idea
(CharlesPab, 16. 7. 2023 4:42)
Dating is a go abroad that encompasses the deviltry of good-natured ally, live increase, and exciting discoveries. It is a method toe which individuals search impractical possibilities, getting to recall each other on a deeper level. Dating allows people to allowance experiences, market ideas, and design consequential connections.
https://voyeurporn.one/
In the empire of dating, undivided encounters a different series of emotions. There's the exhilaration of convocation someone modish, the anticipation of a beginning date, and the thrill of discovering stock interests and shared values. It is a stretch of vulnerability and self-discovery as individuals obtainable themselves up to the plausibility of rapture and companionship.
https://amateurxxx.one/
Effectual communication lies at the essence of dating, facilitating understanding and correlation between two people. It involves active listening, honest expression, and empathy, creating a range for real dialogue. Thoroughly communication, individuals can explore their compatibility, exchange thoughts and dreams, and assemble a groundwork of trust.
It should be mentioned this
(IXAgek, 12. 7. 2023 2:56)
https://bonusi-sbu.ru
It is important to note this
https://bonusi-sb0.ru
Worth noting this
(IXAgek, 11. 7. 2023 21:00)
https://bonusi-v-casino-81.ru
It is important to note this
https://bonusi-v-casino-69.ru
It should be mentioned this
(IXAgek, 11. 7. 2023 18:23)
https://bonusi-22s.ru
It should be mentioned this
https://bonusi-sb0.ru
Directions for writing a descriptive essay
(Buy Essay bdu, 11. 7. 2023 17:57)
Directions for writing a descriptive essay https://accounts.cancer.org/login?redirectURL=https%3A%2F%2Fessayservice.discount/codes/paperhelp/
Exploring the Hypnotic of Dating: Connections, Advancement, and Determining
(CharlesPab, 11. 7. 2023 11:14)
Dating is a go abroad that encompasses the magic of good-natured bearing, personal rise, and far-out discoveries. It is a method through which individuals search romantic possibilities, getting to recall each other on a deeper level. Dating allows people to allowance experiences, unpleasantness ideas, and design consequential connections.
https://thetranny.com/
In the monarchy of dating, one encounters a dissimilar range of emotions. There's the exhilaration of get-together someone trendy, the anticipation of a beginning escort, and the thrill of discovering common interests and shared values. It is a ease of vulnerability and self-discovery as individuals open themselves up to the possibility of inclination and companionship.
https://desiporn.one/
Effective communication lies at the heart of dating, facilitating sympathy and correlation between two people. It involves active listening, up declaration, and empathy, creating a gap object of veritable dialogue. Thoroughly communication, individuals can tour their compatibility, transfer thoughts and dreams, and build a bottom of trust.
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
SogeApoddefmorp smfbz
(RonaldJen, 18. 5. 2025 19:55)