Skip to content

Latest commit

 

History

History
145 lines (104 loc) · 7.97 KB

File metadata and controls

145 lines (104 loc) · 7.97 KB

Written by Todd Hubers on January 23, 2013 Filed under Uncategorized C++ dll exe MSVC PDF PDF to Image PDF to SVG PDF to Text PDFToCairo PDFToHTML PDFToText PDFToXML Poppler Win32 Windows I have been using the Poppler library for some time, over a series of various projects. It’s an open source set of libraries and command line tools, very useful for dealing with PDF files. Poppler is targeted primarily for the Linux environment, but the developers have included Windows support as well in the source code. Getting the executables (exe) and/or dlls for the latest version however is very difficult on Windows. So after years of pain, I jumped on oDesk and contracted Ilya Kitaev, to both compile with Microsoft Visual Studio, and also prepare automated tools for easy compiling in the future.

So now, you can run the following utilities from Windows!

PDFToText – Extract all the text from PDF document. I suggest you use the -Layout option for getting the content in the right order. PDFToHTML – Which I use with the -xml option to get an XML file listing all of the text segments’ text, position and size, very handy for processing in C# PDFToCairo – For exporting to images types, including SVG! Many more smaller utilities Download

Latest binaries: poppler.0.22.0_win32

Compiled with Visual Studio Express 2010 Desktop Older binaries: poppler.0.18.1_win32

Compiling yourself

Check out the Git repository here (also includes a wiki and issues sections)

17 Responses pete says: January 26, 2013 at 4:30 pm I am very interested in this as I am trying to develop an internal tool that relies on the Poppler libraries, I have had no end of trouble compiling / getting this working. My application is written in QT so msvc poses some complications. How can I help on this project, I don’t any experience but I can put in some time… I was wondering if cross compiling the binaries from a linux box would be “better” for all of the windows possibilities… Your thoughts? What do you need next?

Reply Todd Hubers says: January 27, 2013 at 1:42 am Hi Pete, so are you using the (https://github.com/giddie/poppler-qt4-cairo-backend) patch? “I was wondering if cross compiling the binaries from a linux box would be “better” for all of the windows possibilities” – are you referring mingw or sygwin compiling?

Thanks, Todd

Reply pete says: January 27, 2013 at 6:38 pm No, I originally compiled without the Cairo backend, I wasn’t even aware of the path, I’ll need to look at it. What I mean by better is it would seem easier to create the various cross compiling environments. To move forward with my project I installed the msys environment to get it to compile. I ran into no end of frustrations with CMAKE and all the auxillaries that needed to be compiled. It seemed to be a white rabit chase to me, and I started using other people’s compiled libraries to save time only to find out that I couldn’t take one compiled for Microsoft and mix it with one compiled for MSYS.

I finally got a working library but there are some * weird* behaviors that I am convinced have to do with the aforementioned mess. My problem is that I am not a hardcore programmer, and I have only ever learned enough to to what I was wanting to at that moment… So my wall of knowledge is missing a few bricks (Late Game Jenga style).

I have a fair number of resources at my disposal, so depending on what the needs of the project are, I can contribute very positively.

But, I digress, in a short answer, I am talking about Mingw, Msys, and MSVC compiling… Hopefully from one Linux system to these difference configurations, once the scripts are setup, maybe it won’t be horrible to maintain

Reply Todd Hubers says: January 28, 2013 at 1:16 am MSYS is essentially Mingw (in that it requires Mingw), and therefore the compiled assembiles are not strictly windows dlls – they require Mingw to run (full environment or one or more dlls).

This build package aims to compile strictly for windows with minimal runtime dependencies (other than the poppler dependencies). We are working on fully automating the build process so that anyone can compile it, in the future this might include different flavours (such as QT-Cairo) and of course would include ready-to-go dlls for everyone to simply download.

There may be scope for other compiler support, but for now we will be focusing on MSVC.

Reply pete says: January 29, 2013 at 4:33 pm I understand the differences (basically) between MSYS, and MSVC, I thought there was a complie method that didn’t require the MSYS environment that was still functional using the free tool chain… But whatever the scope, I could really use this project and would like to help.

Florian says: January 29, 2013 at 7:00 am First of all: Thank you! It’s really nice to be able to use these tools on Windows.

Bad thing is: I can’t use them (at least version 0.22, 0.18.1 is fine), because I always get an error: “Not a valid Win32 application.”

I still have to use Windows XP. The features at the bitbucket wiki include “Compile for/on Windows 7+”. Does this mean exclusively for Windows 7+? Is there any hope using the current versions with XP?

Reply Todd Hubers says: January 29, 2013 at 7:08 am Hi Florian,

It is my intention to add support as widely as possible, so I’m not going to restrict to Windows 7+, although I probably won’t support anything lower than the latest SP of XP.

I compiled 0.22 with Visual Studio 2012 [Express], perhaps that’s the reason it won’t run on Windows XP. I’ll try and get a VS2008 compilation.

Reply Todd Hubers says: January 29, 2013 at 10:49 pm I have recompiled with: 1) VS 2010, 2) Updated build package which fixes the jpeg bug, now fixed.

Please let me know if the new binaries work. (Still need to try VS2008 if that doesn’t work)

Reply pete says: January 31, 2013 at 8:36 pm The binaries appear to have a MSVCR110.dll dependency that installing the redistributable for 2008 & 2010 SP1 (x64) doesn’t take care of…

Reply Florian says: February 1, 2013 at 10:02 am Thank for your quick response and sorry for my belated reply. The new version also doesn’t work for me.

Reply Harry says: February 6, 2013 at 10:39 pm I have a Makefile fragment that can compile Poppler + dependencies with MSYS on Windows. I am using this to build a utility which links against Poppler, seems to work well but there might be some problems when compiling the utils (they are excluded from my build)

See: https://gist.github.com/HarryR/4726522

If the utilities are statically compiled then no external DLLs etc. are required.

Reply Todd Hubers says: February 7, 2013 at 12:13 am Thanks Harry, I’ll have a look, I have been working on an MSYS solution myself, so between both of these we should be able to maintain a single versatile solution.

Reply Panchua de la Vega del Rosario del Asco says: April 22, 2013 at 12:59 pm No more “MSVCR110.dll dependency” problem after installing Redistribuable Visual C++ pour Visual Studio 2012 Update 1 from

https://www.microsoft.com/fr-fr/download/details.aspx?id=30679

Reply Noury says: April 25, 2013 at 1:57 pm Hi,

Thanks for making available the binaries ready for download/use. I was wondering if there is a x64 version for them ?

Thanks

Reply Agnel Kurian says: May 27, 2013 at 1:38 pm I could not find a LICENSE file in the source tree. I am assuming the code is shared under GPL. Am I correct?

Reply Todd Hubers says: May 28, 2013 at 1:45 am Hi Agnel,

It is placed (awkwardly) in the post_build_files folder for now. It is the same license as poppler, which appears to be GPL2.

Sorry to others asking questions, I have been really busy. I will try and set up some permanent funding for an outsourced resource to maintain and improve windows binary support (including MSYS).

Reply Dmitry says: June 7, 2013 at 7:40 pm Looks like Visual Studio 2012 generates EXE which is not executable under XP (even with MSVCR110.dll present). I get the error which I typically get when try to launch x64 binary on my x32 XP. I am sure there should be some backward-compatibility flags…