Skip to content

logobosstriple

Menu

C Extract Thumbnail From Pdf

Posted on 22.08.2019by admin
logobosstriple.netlify.com › ▼ C Extract Thumbnail From Pdf ▼
Active1 year, 6 months ago
  1. View Pdf Files As Thumbnails
  2. Extract From Pdf

6 Ways to Extract Images from PDF Files to TIFF, JPEG, PNG. Thumbnail image of the first page of the PDF document and on the right you’ll see a bunch of options.

Looking at other posts for this could not find an adequate solution that for my needs. Trying to just get the first page of a pdf document as a thumbnail. This is to be run as a server application so would not want to write out a pdf document to file to then call a third application that reads the pdf to generate the image on disk.

Thanks.

AndrewBAndrewB
74411 gold badge99 silver badges1818 bronze badges

closed as off-topic by Kevin Brown, durron597, rene, gunr2171, TylerHJun 22 '15 at 19:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – Kevin Brown, durron597, rene, TylerH
If this question can be reworded to fit the rules in the help center, please edit the question.

View Pdf Files As Thumbnails

5 Answers

Matthew Ephraim released an open source wrapper for Ghostscript that sounds like it does what you want and is in C#.

Link to Source Code: https://github.com/mephraim/ghostscriptsharp

Link to Blog Posting: http://www.mattephraim.com/blog/2009/01/06/a-simple-c-wrapper-for-ghostscript/

You can make a simple call to the GeneratePageThumb method to generate a thumbnail (or use GeneratePageThumbs with a start and end page number to generate thumbnails for multiple seperate pages, with each page being a seperate output file), default file format is jpeg but you can change it, and many other options, by using the alternate GenerateOutput method call and specify options such as file format, page size, etc..

PeterC Extract Thumbnail From PdfPeter
8,18066 gold badges5151 silver badges9191 bronze badges

I think that Windows API Code pack for Microsoft .NET framework might do the trick easiest. What it can is to generate the same thumbnail that Windows Explorer does (and that is first page), and you can chose several sizes, they go up to 1024x1024, so it should be enough. It is quite simple, just create ShellObject.FromParsingName(filepath) and find its Thumbnail subclass.

The problem might be what your server is. This works on Windows 7, Windows Vista and I guess Windows Server 2008. Also, Windows Explorer must be able to show thumbnails on that machine. Twincat software. The easiest way to insure that is to install Adobe Reader. If all of this is not a problem, I think that this is the most elegant way.

UPDATE: Adobe Reader has dropped support for thumbnails in the recent versions so its legacy versions must be used.

UPDATE2: According to comment from Roberto, you can still use latest version of Adobe Reader if you turn on thumbnails option in Edit - Preferences - General.

Ivan IčinIvan Ičin
5,32044 gold badges2525 silver badges4444 bronze badges

I used to do this kind of stuff with imagemagick (Convert) long ago.There is a .Net Wrapper for that, maybe it's worth checking out :http://imagemagick.codeplex.com/releases/view/30302

Sebastian EdelmeierSebastian Edelmeier
2,87222 gold badges2929 silver badges5454 bronze badges

Extract From Pdf

Martijn Pieters♦
761k166166 gold badges27702770 silver badges24842484 bronze badges
Jorge Alberto Chavez BarreraJorge Alberto Chavez Barrera

This works very well. The only dependencies are GhostScript's gsdll32.dll (you need to download GhostScript separately to get this, but there is no need to have GhostScript installed in your production environment), and PDFSharp.dll which is included in the project.

saillesaille
6,97022 gold badges3737 silver badges5151 bronze badges

Not the answer you're looking for? Browse other questions tagged c#.netimagepdfopen-source or ask your own question.

Top Articles

  • Patch Editor Xbox 360
  • Descargar Auxiliar Biblia Portavoz Pdf Gratis
  • Bohemian Rhapsody Notes For Piano Pdf Sheets
  • Batch Gintama Season 3
  • Fl Studio 12.2 Regkey
  • Linkin Park A Thousand Suns Zip
  • Update Firmware Tanaka T22 2017
  • Cisco Binary Games
  • Serial Key Instagram Er
  • Revival Deluxe 2 Full Version
  • Fight Night Champion Pc Activision
  • Skunk 3 Full Game Download
  • Jagged Edge Jagged Little Thrill Zip
  • Football Manager 2005 Patch 5.0.5
  • Tvs Barcode Printer T9650 Plus Driver
  • Metin2 Yang Hack Dowland Samp
Copyright © 2019 – logobosstriple