doppler ~main

D bindings for the Poppler PDF rendering library


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Doppler - D bindings for the Poppler PDF rendering library

This library provides a D wrapper around the Poppler PDF rendering library (poppler-23.07.0). The current functionality is limited to displaying PDF documents loaded from a file.

No actual PDF generating abilities have been wrapped yet, but I am happy to add them here if requested.

The current functionality encloses:

  • Document

static Document loadFromFile(string fileName, string password = "");

int getNPages();

Page getPage(int index);

  • Page

void getSize(out double width, out double height);

void render(Context context);

void renderForPrinting(Context context);

ImageSurface getImage(int imageId);

Building

Linux

sudo apt install libpoppler-glib8

Prerequisites

Install Poppler glib package, Ubuntu 22.04 example (ymmv):

sudo apt install libpoppler-glib8

Open a terminal and run

dub build

then change directory into examples/pdfview and run

dub build

Run the sample

./pdfview file:$PWD/gtk3.pdf

Windows

Prerequisites

Install latest msys2 from https://www.msys2.org/#installation

Install msys2 package mingw-w64-x86_64-poppler using pacman

pacman -S mingw-w64-x86_64-poppler

Download and install GTK 64 bit runtime from https://gtkd.org/

set PATH=%PATH%;C:\msys64\mingw64\bin;C:\Program Files\Gtk-Runtime\bin

(order of the path is important!)

Open a windows command prompt and run

dub build

then change directory into examples/pdfview and run

dub build

Run the sample

pdfview.exe file:/Users/myuser/src/doppler/example/pdfview/gtk3.pdf

MacOS

TODO

Does anyone have a Macbook and wants to help out?

Prerequisites

TODO

A lot!

Releases

v0.0.1 first release

Authors:
  • Sinisa Susnjar
Dependencies:
gtk-d
Versions:
0.0.1 2023-Sep-23
~main 2024-Oct-07
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 12 downloads total

Score:
0.3
Short URL:
doppler.dub.pm