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://chestyle.com/lj/20100628_1.php
ChatGpt
(ChatGPTtic, 18. 5. 2023 0:33)
Revolutionizing Conversational AI
ChatGPT is a groundbreaking conversational AI model that boasts open-domain capability, adaptability, and impressive language fluency. Its training process involves pre-training and fine-tuning, refining its behavior and aligning it with human-like conversational norms. Built on transformer networks, ChatGPT's architecture enables it to generate coherent and contextually appropriate responses. With diverse applications in customer support, content creation, education, information retrieval, and personal assistants, ChatGPT is transforming the conversational AI landscape.
Literary analysis the outsiders
(Buy Essay tre, 17. 5. 2023 19:20)
Literary analysis the outsiders https://bbeyeler.de/hallo-welt/
BITCOIN MONEY SEARCH SOFTWARE
(LamaSmity, 14. 5. 2023 4:34)
I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man, and maybe even a billionaire!
This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!
Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!
Video:
https://www.youtube.com/watch?v=cOLX3g6ByR4
Telegram:
https://t.me/btc_profit_search
Canadian News Today
(micheal#decosta[OjoltozEjuzutiVT,2,5], 13. 5. 2023 14:16)
Canadian News Today is your source for the latest news, video, opinions and analysis from Canada and around the world.
Find more details : https://www.canadiannewstoday.com/
娛樂城
(Jasoncet, 12. 5. 2023 17:18)
娛樂城
福佑娛樂城致力於在網絡遊戲行業推廣負責任的賭博行為和打擊成癮行為。 本文探討了福友如何通過關注合理費率、自律、玩家教育和安全措施來實現這一目標。
理性利率和自律:
福佑娛樂城鼓勵玩家將在線賭博視為一種娛樂活動,而不是一種收入來源。 通過提倡合理的費率和設置投注金額限制,福佑確保玩家參與受控賭博,降低財務風險並防止成癮。 強調自律可以營造一個健康的環境,在這個環境中,賭博仍然令人愉快,而不會成為一種有害的習慣。
關於風險和預防的球員教育:
福佑娛樂城非常重視對玩家進行賭博相關風險的教育。 通過提供詳細的說明和指南,福佑使個人能夠做出明智的決定。 這些知識使玩家能夠了解他們行為的潛在後果,促進負責任的行為並最大限度地減少上癮的可能性。
安全措施:
福佑娛樂城通過實施先進的技術解決方案,將玩家安全放在首位。 憑藉強大的反洗錢系統,福友確保安全公平的博彩環境。 這可以保護玩家免受詐騙和欺詐活動的侵害,建立信任並促進負責任的賭博行為。
結論:
福佑娛樂城致力於培養負責任的賭博行為和打擊成癮行為。 通過提倡合理的費率、自律、玩家教育和安全措施的實施,富友提供安全、愉快的博彩體驗。 通過履行社會責任,福佑娛樂城為其他在線賭場樹立了積極的榜樣,將玩家的福祉放在首位,營造負責任的博彩環境。
viagra sans ordonnance viagra pas cher
(prxviagra.com, 12. 5. 2023 1:30)https://sildfrance.com/ pilule viagra
Essay on computers today
(Buy Essay atj, 12. 5. 2023 0:20)
Essay on computers today https://www.transtats.bts.gov/exit.asp?url=https://essaypro.pro
Resume for entry level it job
(Buy Essay ixp, 10. 5. 2023 3:43)
Resume for entry level it job https://www.google.com.sa/url?q=https://essayservice.discount/codes/speedypaper/
Custom blog post proofreading sites for university
(Buy Essay qhh, 8. 5. 2023 13:43)
Custom blog post proofreading sites for university https://www.mixcloud.com/shielddibble26/
BITCOIN LOTTERY - SOFTWARE FREE
(LamaSmity, 7. 5. 2023 19:15)
I want to show you one exclusive program called (BTC PROFIT SEARCH AND MINING PHRASES), which can make you a rich man, and maybe even a billionaire!
This program searches for Bitcoin wallets with a balance, and tries to find a secret phrase for them to get full access to the lost wallet!
Run the program and wait, and in order to increase your chances, install the program on all computers available to you, at work, with your friends, with your relatives, you can also ask your classmates to use the program, so your chances will increase tenfold!
Remember the more computers you use, the higher your chances of getting the treasure!
Video:
https://www.youtube.com/watch?v=cOLX3g6ByR4
Telegram:
https://t.me/btc_profit_search
Breaking Stereotypes: The Understanding of Be captivated by in Gay Men
(EgorSmany, 6. 5. 2023 10:43)
Disposition knows no bounds and is not limited to any gender or lustful orientation. Gay men give birth to proven this time and again with their superb relationships built on man, trust, and reciprocal respect. In spite of the stereotypes and jaundice that survive in our society, gay men possess demonstrated their capacity to love deeply and meaningfully.
https://bragx.com/videos/52211/wskippy19-shooting-a-nice-load/
At one of the substantive challenges that gay men aspect in their relationships is the societal difficulty that dictates what a "universal" relationship should look like. These pressures may escort to self-doubt and insecurities, making it ill-behaved pro gay men to undertake their feelings and precise their love. As a fruit, some may vacillating up hiding their relationships or desire the desperate straits to conform to societal expectations, leading to awkward relationships.
In any event, the enjoy between two people, regardless of gender or sex briefing, is unequalled and should be celebrated. Communication and emotional intimacy are main in construction and maintaining a sturdy relationship. Gay men have shown occasion and again that they are not regretful to be unprotected and emotionally indicative, foremost to stronger and more privy relationships.
https://bragx.com/videos/40474/skinny-bottoms-deeply-fisted-by-leather-daddy/
It is crucial to praise and admit the disparity of regard, including inamorato between gay men. Their relationships are no various from any other and should not be judged based on stereotypes or societal expectations. We should learn to appreciate the deepness of suitor that exists between two people and eulogize it, regardless of their propagative orientation.
In conclusion, gay men have proven that they are qualified of weighty, important woman that transcends societal prejudices and stereotypes. They warrant to clothed their relationships valued and acclaimed, just like any other individual. Near accepting and celebrating the diversity of love, we can bring into being a more broad and accepting society.
love collection
(Lesletoche, 6. 5. 2023 9:28)
¦¦¦
Lolita love collection:
https://snippet.host/fdwzmc
¦¦¦
Business objective resume examples
(Buy Essay fcz, 6. 5. 2023 2:22)
Business objective resume examples https://www.google.com.bo/url?q=https://essayservice.discount/codes/speedypaper/
tee¦n fuc¦k
(Isaihadect, 5. 5. 2023 5:54)
¦¦¦¦¦
Lolit¦a tee¦n fuc¦k collecti¦on
c¦p p¦thc vid pic:
attn.cc/ZQwvzq
¦¦¦¦¦
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
Modern economic problems
(DamiankEw, 18. 5. 2023 13:58)