[gdal-dev] Build GDAL PDF Driver with PDFium

Parveen Sharma sharma1981 at outlook.com
Mon Jan 13 15:26:54 PST 2025


Thanks

What about the PDFium git repo which I mentioned? Do I need to build PDFium using that git repo only?

________________________________
From: David Klaus <dklaus at carlsonsw.com>
Sent: Monday, January 13, 2025 11:34 PM
To: Parveen Sharma <sharma1981 at outlook.com>
Cc: Michał Kowalczuk via gdal-dev <gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] Build GDAL PDF Driver with PDFium

Parveen,

A couple of years ago my company used the following options to generate a GDAL PDF dynamic driver for GDAL 3.7.0:

-DGDAL_ENABLE_DRIVER_PDF_PLUGIN=ON
-DGDAL_USE_PDFIUM=ON
-DPDFIUM_INCLUDE_DIR="%~dp0ExtractPDFium\install\include\pdfium"
-DPDFIUM_LIBRARY="%~dp0ExtractPDFium\install\lib\pdfium.lib"

Obviously the include directory and library paths will depend on your specific folder structure, so you might need to adjust those on your system. But we were successful in building 3.7.0 with GDAL PDF via dll using these options and perhaps they will work for you as well. Hopefully this reply is helpful to you. Best of luck,



On Sun, Jan 12, 2025 at 11:41 PM Parveen Sharma via gdal-dev <gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>> wrote:
Hello

I am trying to build from GDAL from source using v3.9.3 tag

I plan to use "PDFium" library for building GDAL PDF Dynamic driver and have below 3 questions


Ques 1) Are below a right combination of CMAKE options?

<arg value="-DGDAL_ENABLE_DRIVER_PDF=ON"/>
<arg value="-DGDAL_USE_POPPLER=OFF"/>
<arg value="-DGDAL_USE_PDFIUM=ON"/>
<arg value="-DGDAL_ENABLE_DRIVER_PDF_PLUGIN=ON"/>


In addition I will set option PDFIUM_INCLUDE_DIR to point to Path to an include directory with the ``public/fpdfview.h`` header file and option PDFIUM_LIBRARY to point to

Path to a shared or static library file.

Ques 2) Should I be building PDFium from the "master" branch of below fork by Even Rouault to work with GDAL v3.9.3 ?

https://github.com/rouault/pdfium_build_gdal_3_1

Ques 3) If the answer to (2) point is yes, then can I use above branch for both Windows and Linux?

Please suggest and assist.

Best Regards
Parveen




_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
David Klaus
Carlson Software



Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250113/533a80cf/attachment-0001.htm>


More information about the gdal-dev mailing list