Making wxPDFView library

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
Super wx Problem Solver
Super wx Problem Solver
Posts: 251
Joined: Wed Jan 20, 2010 1:15 pm

Making wxPDFView library

Post by dkaip » Sat Sep 29, 2018 7:06 pm

Hello. I am trying to making wxPDFView lib in Linux and Windows
So Pdfium lib instructions for Linux are exactly as bellow.
Linux Mint OS


download depot_tools
git clone ... _tools.git

export PATH=$PATH:/home/where dir depot_tools is ...

sudo apt-get install ninja
** if have problems later like " now monitoring process activity" and no build runs must install ninja like bellow.
apt-get install ninja-build

mkdir repo
cd repo
gclient config --unmanaged
gclient sync
cd pdfium

Make dir out/debug
mkdir out
mkdir out/debug

Making file
gn args out/debug

gedit out/debug/

Adding in
is_debug = false
pdf_is_standalone = true
pdf_use_skia = false
pdf_use_skia_paths = false
pdf_enable_xfa = false
pdf_enable_v8 = false
is_component_build = false
clang_use_chrome_plugins = false
is_clang = false (If one builds PDFium with 'is_clang = false' hence GCC is selected as
the compiler)

Making ninja files
gn gen out/debug

Making lib with ninja
sudo ./ninja -C out/debug pdfium_all

Test library
out/debug/pdfium_test --png /home/%my profile ...%/my dir .../a_pdf_file.pdf

Ok fine, pdfium_test app file extract all pages as png.

Now the instructions for Windows 10

To build Pdfium in windows 10 i have make all these steps.
1. Download vs_professional__532381385.1538640085
2. In cmd running vs_professional__532381385.1538640085 --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended as the ... up-Windows page says download VisualStudio 17 profesional
3. Download and run vs_buildtools__532381385.1538640085.exe
4. Download depot_tools and extract at C:\depot_tools and ad in path environment variable
5. Set DEPOT_TOOLS_WIN_TOOLCHAIN to 0 in path environment variable
6. Download and install python-2.7.15.amd64.exe at c:\Python27 and add it in path environment variable
7. Download Git-2.19.0-64-bit.exe and install it and the settings ..
$ git config --global "My Name"
$ git config --global "[email protected]"
$ git config --global core.autocrlf false
$ git config --global core.filemode false
$ git config --global branch.autosetuprebase always
8. Download ninja-win and extract ninja.exe to C:\chromiun\src
9. In cmd with
$ mkdir chromium && cd chromium
$ fetch --no-history chromium

if for a reason stop process we must use the $ fetch sync to synchronize the folder

$ cd src
$ gn gen --ide=vs --filters=//pdfium --no-deps out\Default (for generation of build files with vs and ninja)
$ ninja -C out\Default pdfium_all

Running tests are ok.
$ out\Default pdfium_embeddertests
$ out\Default pdfium_unittests
Now lib Pdfium for Linux Mint and Windows 10 are ready.

Let's make pdfium_test.exe compiling 2353 files and after some hours...
C:\chromium\src>gn gen --ide=vs --filters=//pdfium --no-deps out\pdfiumtest
C:\chromium\src>ninja -C out/pdfiumtest pdfium_test
Let say 1.pdf is in C:\chromium\src> dir...
C:\chromium\src>out\pdfiumtest\pdfium_test --png 1.pdf
Rendering PDF file 1.pdf.
Rendered 1 pages.
out\Default\pdfium_test --png 1.pdf
Now we must build wxPdfView...
I will try later and upload intructions ... i follow exact instructions of Utelle at because other methods have errors...

Thank you

Post Reply