Is there any library or way to parse PDF file with C++??
I have tried to use PoDoFo library but I never succeeded to install it, too many dependencies and I'm getting a lot of error during compilation with mingw.
I have recently been looking into the possibility of using PDFs for the basis of a project. I have been looking around at libraries and keep coming back to Adobe PDF Library[1] but I have yet to ask what the pricing for this is.
As the project is an off the books (read work related but not work sanctioned) and I think that the Adobe library will not be cheap, I thought I would start with a book: Developing with PDF: Dive Into the Portable Document
by Leonard Rosenthol[2]
Edit:
As you don't give much info about what you are doing, I'll just mention that there is also an Acrobat SDK that may be of interest (if Acrobat is something you use).
Thank you for your reply! I really appreciate your help
Well I want to create a GUI (vs2008 + Qt) that can read a PDF line by line and detect the presence of a checkboxes in the PDF. Store the state of those checkbox (true or false) in a data base. I proceeded as follow:
under vs2008 and with CMake.exe (I dropped MinGW)
1- Built zlib library
2- Built freetype library
3- Build jpeg library
4- Built png library
5- Built PoDoFo (set the appropriate path (debug and release) of the libraries)
When it comes to build the PoDoFo library, I got these errors:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
5
5>Linking...
3>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function "public: __cdecl PoDoFo::PdfFontCache::~PdfFontCache(void)" (??1PdfFontCache@PoDoFo@@QEAA@XZ)
5>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function "public: __cdecl PoDoFo::PdfFontCache::~PdfFontCache(void)" (??1PdfFontCache@PoDoFo@@QEAA@XZ)
2>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function "public: __cdecl PoDoFo::PdfFontCache::~PdfFontCache(void)" (??1PdfFontCache@PoDoFo@@QEAA@XZ)
4>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Done_FreeType referenced in function "public: __cdecl PoDoFo::PdfFontCache::~PdfFontCache(void)" (??1PdfFontCache@PoDoFo@@QEAA@XZ)
5>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function "protected: void __cdecl PoDoFo::PdfFontCache::Init(void)" (?Init@PdfFontCache@PoDoFo@@IEAAXXZ)
3>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function "protected: void __cdecl PoDoFo::PdfFontCache::Init(void)" (?Init@PdfFontCache@PoDoFo@@IEAAXXZ)
2>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function "protected: void __cdecl PoDoFo::PdfFontCache::Init(void)" (?Init@PdfFontCache@PoDoFo@@IEAAXXZ)
4>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Init_FreeType referenced in function "protected: void __cdecl PoDoFo::PdfFontCache::Init(void)" (?Init@PdfFontCache@PoDoFo@@IEAAXXZ)
5>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Get_Postscript_Name referenced in function "public: class PoDoFo::PdfFont * __cdecl PoDoFo::PdfFontCache::GetFont(struct FT_FaceRec_ *,bool,bool,class PoDoFo::PdfEncoding const * const)" (?GetFont@PdfFontCache@PoDoFo@@QEAAPEAVPdfFont@2@PEAUFT_FaceRec_@@_N1QEBVPdfEncoding@2@@Z)
4>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Get_Postscript_Name referenced in function "public: class PoDoFo::PdfFont * __cdecl PoDoFo::PdfFontCache::GetFont(struct FT_FaceRec_ *,bool,bool,class PoDoFo::PdfEncoding const * const)" (?GetFont@PdfFontCache@PoDoFo@@QEAAPEAVPdfFont@2@PEAUFT_FaceRec_@@_N1QEBVPdfEncoding@2@@Z)
2>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Get_Postscript_Name referenced in function "public: class PoDoFo::PdfFont * __cdecl PoDoFo::PdfFontCache::GetFont(struct FT_FaceRec_ *,bool,bool,class PoDoFo::PdfEncoding const * const)" (?GetFont@PdfFontCache@PoDoFo@@QEAAPEAVPdfFont@2@PEAUFT_FaceRec_@@_N1QEBVPdfEncoding@2@@Z)
3>podofo.lib(PdfFontCache.obj) : error LNK2019: unresolved external symbol FT_Get_Postscript_Name referenced in function "public: class PoDoFo::PdfFont * __cdecl PoDoFo::PdfFontCache::GetFont(struct FT_FaceRec_ *,bool,bool,class PoDoFo::PdfEncoding const * const)" (?GetFont@PdfFontCache@PoDoFo@@QEAAPEAVPdfFont@2@PEAUFT_FaceRec_@@_N1QEBVPdfEncoding@2@@Z)
5>podofo.lib(PdfFontMetricsFreetype.obj) : error LNK2001: unresolved external symbol FT_Get_Postscript_Name
4>podofo.lib(PdfFontMetricsFreetype.obj) : error LNK2001: unresolved external symbol FT_Get_Postscript_Name
2>podofo.lib(PdfFontMetricsFreetype.obj) : error LNK2001: unresolved external symbol FT_Get_Postscript_Name
btw, just curious, why you want to parse pdf files?
Massi wrote:
...that can read a PDF line by line and detect the presence of a checkboxes in the PDF. Store the state of those checkbox (true or false) in a data base.
Hello chipp, I'm sorry for the late response, I have to create a GUI that can read a PDF file line by line and get the status of checkboxes (checked or not) .