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://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.
kèo nhà cái
(ClarkRoaph, 11. 7. 2023 0:07)
Tiếp tục nội dung:
Đối với những người yêu thích cá cược bóng đá, kèo nhà cái không chỉ là cơ hội để giành lợi nhuận mà còn là một cách để tăng thêm phần hứng khởi và thú vị khi xem trận đấu. Việc đặt cược trên những trận đấu yêu thích không chỉ tạo thêm kích thích mà còn là một cách để thể hiện đam mê và sự tin tưởng vào đội bóng mình yêu thích.
Tuy nhiên, để đạt được thành công trong việc cá cược, người chơi cần có sự kiên nhẫn, khả năng phân tích và đưa ra quyết định đúng đắn. Đừng dựa quá nhiều vào may mắn, mà hãy tìm hiểu kỹ về đội bóng, phong độ, lực lượng và các yếu tố khác có thể ảnh hưởng đến kết quả trận đấu. Kết hợp với việc tham khảo tỷ lệ kèo nhà cái, người chơi sẽ có một cơ hội tốt hơn để đạt được kết quả mong muốn.
Ngoài ra, hãy nhớ rằng cá cược bóng đá chỉ nên là một phần giải trí trong cuộc sống và không nên gây áp lực hoặc ảnh hưởng đến sự cân bằng tài chính cá nhân. Đặt ra ngân sách hợp lý và tuân thủ quy tắc cá cược có trách nhiệm là điều cần thiết. Nếu cảm thấy mình bị mắc kẹt trong việc cược quá nhiều hoặc có dấu hiệu nghiện cờ bạc, người chơi nên tìm sự giúp đỡ từ các tổ chức chuyên về hỗ trợ cá cược và tư vấn tài chính.
Cuối cùng, việc tham gia cá cược bóng đá qua kèo nhà cái có thể mang đến cho người chơi những trải nghiệm thú vị và hứng khởi. Với sự cân nhắc, tìm hiểu và sử dụng thông tin từ các nhà cái uy tín, người chơi có thể tận hưởng không chỉ niềm vui của trận đấu mà còn cảm nhận được sự háo hức khi dự đoán và đạt được kết quả thành công.
Tóm lại, kèo nhà cái là một công cụ hữu ích để người chơi tham gia cá cược bóng đá. Tuy nhiên, thành công trong việc cá cược không chỉ dựa vào tỷ lệ kèo mà còn phụ thuộc vào kiến thức, phân tích và quyết định cá cược thông minh. Hãy tận hưởng việc tham gia cá cược bóng đá một cách có trách nhiệm và biết giới hạn để có trải nghiệm tốt nhất.
go88 vin
(Donaldtup, 9. 7. 2023 19:10)
Go88.vin: Trò chơi có trách nhiệm xã hội
Go88.vin không chỉ tập trung vào việc cung cấp trải nghiệm chơi game tuyệt vời, mà còn đặt trách nhiệm xã hội lên hàng đầu. Nền tảng này cam kết thúc đẩy trò chơi có trách nhiệm và đảm bảo môi trường chơi game an toàn và công bằng. Dưới đây là những nỗ lực của Go88.vin trong việc thực hiện trách nhiệm xã hội:
Quản lý chơi game có trách nhiệm: Go88.vin luôn thúc đẩy một môi trường chơi game có trách nhiệm, đảm bảo rằng người chơi không bị lạm dụng và kiểm soát việc chơi game của mình. Họ cung cấp các công cụ và tài liệu giúp người chơi nhận ra và kiểm soát hành vi chơi game của mình.
Bảo vệ người chơi vị thành niên: Go88.vin tuân thủ chặt chẽ các quy định liên quan đến tuổi tác để đảm bảo rằng trò chơi của họ chỉ dành cho người chơi trưởng thành. Họ áp dụng các biện pháp để ngăn chặn truy cập của người chơi vị thành niên và đảm bảo rằng không có hoạt động cá cược không đúng tuổi diễn ra trên nền tảng của họ.
Chính sách bảo mật và quyền riêng tư: Go88.vin đảm bảo bảo mật và an toàn thông tin cá nhân của người chơi. Họ tuân thủ các quy định về bảo mật dữ liệu và không chia sẻ thông tin cá nhân của người chơi với bên thứ ba mà không có sự đồng ý của họ.
Hỗ trợ tổ chức từ thiện: Go88.vin hiểu rằng trách nhiệm xã hội không chỉ dừng lại ở việc cung cấp trò chơi, mà còn phải đóng góp vào cộng đồng. Họ thường xuyên hỗ trợ các hoạt động từ thiện và tổ chức các chiến dịch gây quỹ để giúp đỡ những người có hoàn cảnh khó khăn.
Go88.vin không chỉ mang lại niềm vui và sự hưng phấn cho người chơi, mà còn thể hiện sự cam kết với trách nhiệm xã hội. Hãy tham gia Go88.vin và cùng nhau xây dựng một cộng đồng chơi game có trách nhiệm và phát triển bền vững!
jili fishing game
(Kennethcab, 9. 7. 2023 9:43)
Jili Fishing Game: Sự phát triển đáng kinh ngạc của Jili Games
Trong thời đại công nghệ 4.0, ngành công nghiệp game online đang trở thành một xu hướng không thể phủ nhận. Trong số những nhà cung cấp trò chơi nổi tiếng, Jili Games đã chứng minh sự xuất sắc của mình với loạt sản phẩm hấp dẫn như Jili Fishing Game và Jili Slot Game. Đây là những trò chơi độc đáo và đầy thách thức, đồng thời cũng mang lại những trải nghiệm đáng kinh ngạc cho người chơi.
Jili Fishing Game là một trong những trò chơi đình đám nhất của Jili Games. Với giao diện tuyệt đẹp và hiệu ứng âm thanh sống động, trò chơi đã tái hiện một hồ nước ảo chân thực, nơi người chơi có thể tận hưởng cảm giác như đang thực sự câu cá. Hệ thống tính điểm và phần thưởng hấp dẫn đưa người chơi vào một cuộc phiêu lưu đầy thú vị, nơi họ có thể săn bắt những loài cá đa dạng và nhận được những phần thưởng giá trị.
Bên cạnh Jili Fishing Game, Jili Games cũng tự hào với dòng sản phẩm Jili Slot Game. Những trò chơi slot này không chỉ sở hữu đồ họa tuyệt đẹp và âm thanh chân thực, mà còn mang đến cho người chơi cơ hội giành được những phần thưởng lớn. Mega Ace Jili Slot là một ví dụ điển hình, nơi tỉ lệ thưởng cao cùng với những tính năng đặc biệt đã thu hút hàng ngàn người chơi.
Jili Games cũng luôn chú trọng đến sự hài lòng của khách hàng và người chơi. Với chương trình khuyến mãi hấp dẫn, nhà cung cấp này tặng 300K cho người chơi mới chỉ cần nạp đầu. Điều này không chỉ giúp người chơi trải nghiệm miễn phí mà còn tạo điều kiện thuận lợi để họ khám phá những tính năng và sức hút của Jili Games.
Sự phát triển của Jili Games không chỉ dừng lại ở việc cung cấp các trò chơi tuyệt vời, mà còn bao gồm việc tạo dựng cộng đồng người chơi sôi động và thân thiện. Các sự kiện đặc biệt và giải đấu thường xuyên được tổ chức, thu hút sự quan tâm của rất nhiều người chơi đam mê. Nhờ sự đổi mới và nỗ lực không ngừng, Jili Games đã và đang góp phần làm phong phú hơn cả thế giới game online.
Nếu bạn muốn trải nghiệm Jili Fishing Game hoặc Jili Slot Game, bạn có thể dễ dàng tải xuống trên PC của mình hoặc truy cập vào trang web chính thức của Jili Games. Đừng bỏ lỡ cơ hội tham gia vào cuộc phiêu lưu tuyệt vời này và khám phá thế giới giải trí đầy sức hút từ Jili Games.
Bonus no cadastro
(Kennethcab, 8. 7. 2023 16:50)
Are you looking for an online casino that offers fantastic bonuses upon registration? Look no further! At WAKABET, we have the perfect combination of thrilling games and attractive bonuses to enhance your gaming experience. From bonus no cadastro (registration bonuses) to bonus sem deposito (no deposit bonuses), we have it all. Let's dive into the world of exciting bonuses and endless opportunities to win!
More Than 100 Games:
With WAKABET, you'll have access to a wide selection of over 100 captivating games. Whether you prefer classic slots, table games, or live casino experiences, we have something for everyone. Our games are designed to provide entertainment and excitement while giving you the chance to win big. Get ready to explore the thrilling world of online gambling with us!
Fast Deposits:
We understand the importance of a seamless gaming experience, which is why we offer fast and convenient deposit options. At WAKABET, you can quickly and securely deposit funds into your account, allowing you to start playing your favorite games without any delays. Our reliable payment methods ensure a hassle-free deposit process, giving you more time to enjoy the excitement of the games.
Register Now at WAKABET:
Sign up today at WAKABET and unlock a world of bonuses and rewards. As a token of appreciation for choosing us, we offer a generous bonus on registration. You don't even need to make a deposit to enjoy these rewards! Simply create an account, and you'll receive a bonus in your account balance. It's our way of welcoming you to the WAKABET family and giving you a head start on your gaming journey.
Daily Diamond Discount:
At WAKABET, we believe in rewarding our loyal players. That's why we have the exclusive Daily Diamond Discount program. As you continue to play and enjoy our games, you'll earn Diamond points. These points can be redeemed for various benefits, including discounts on your deposits. It's our way of showing appreciation for your loyalty and providing you with additional value for your money.
Net Win/Loss Cashback:
We understand that winning and losing are part of the gaming experience. To ensure that you always have a thrilling time, we offer a Net Win/Loss Cashback program. This means that regardless of whether you win or lose, you'll receive a cashback on your net losses. It's a fantastic opportunity to recoup some of your losses and continue playing your favorite games.
Conclusion:
If you're looking for an online casino that offers exciting bonuses on registration, WAKABET is the place to be. With our extensive selection of games, fast deposits, and rewarding bonus programs, we strive to provide you with the ultimate gaming experience. Don't miss out on the opportunity to play, win, and get rewarded. Register now at WAKABET and embark on an exhilarating journey filled with thrilling games and lucrative bonuses!
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
Автоматика На Распашные Ворота
(DavidNoums, 11. 5. 2025 16:31)