Making wxPDFView library

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
dkaip
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 202
Joined: Wed Jan 20, 2010 1:15 pm

Making wxPDFView library

Postby 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

Repository: https://pdfium.googlesource.com/pdfium/

download depot_tools
----------------
git clone https://chromium.googlesource.com/chrom ... _tools.git

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

ninja
--------
sudo apt-get install ninja

pdfium
----------
mkdir repo
cd repo
gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
gclient sync
cd pdfium

Make dir out/debug
---------------------
mkdir out
mkdir out/debug


Making args.gn file
---------------------
gn args out/debug


Opens args.gn
-------------------------------------
gedit out/debug/args.gn

Adding in args.gn
--------------------------------
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
-------------------------------

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 https://chromium.googlesource.com/chrom ... 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 user.name "My Name"
$ git config --global user.email "[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 https://github.com/TcT2k/wxPDFView because other methods have errors...


Thank you
Jim

Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 3 guests