[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible gb.poppler bug


While working on a PdfVioewer for Gambos I came across following issue when reading the internal index pages

When and index is read from PdfIndex my code generates a TreeView with the index in it.
Next I retrieve the index page so a click in the TreeView will show the page in a DocumentView.
All this works fine, expect for some pdf files it creates the index in the TreeView, but returns 0 for each and every page.

I figured out that this returning page 0, doesn't happen for pdf files with format lower that 1.7, they produce a page and I can make a clickable Treeview event to show it.
Pdf files in format 1.7 always return page 0, but do build the correct TreeView.

Below debug output in the load index routine I wrote (hPdfIndex is a PdfIndex), returns proper values for Action.Text, Action.Type and Action.Goto.Page IF the format is lower than PDF 1.7:

Debug "Action.Text " & hPdfIndex.Action.Text
Debug "Action.Type " & hPdfIndex.Action.Type
Debug "Action.Goto.Page " & hPdfIndex.Action.Goto.Page

For Pdf files >= PDF 1.7 the Action.Goto.Page ALWAYS returns 0

To retrieve the format, right-click a pdf file and in 'Properties -> Tab Document' you will find this info (at least on a MATE desktop)
Atril, the default MATE document viewer does give me a clickable index for PDF 1.7 format files, so the page is definitely available internal, but gb.poppler fails to retrieve it.

My question: Is this a bug in Gambas poppler or does the underlying library simply not support Pdf 1.7 format?

gbWilly

[GambOS](https://gambos.gambas.one/)
[Gambas3 for Debian/Ubuntu](https://gitlab.com/gbWilly/gambas3-debian-repository)
[GambOS](https://gambos.gambas.one/)

...there is always a Catch if things go wrong!

[System]
Gambas=3.19.6
OperatingSystem=Linux
Distribution=Debian GNU/Linux 12 (bookworm)
Kernel=6.1.0-41-amd64
Architecture=x86_64
Cores=16
Memory=15696M
Language=en_US.UTF-8
Platform=x11
Desktop=MATE
DesktopResolution=96
DesktopScale=8
WidgetTheme=blackmate
Font=Cantarell,11
[Programs]
dpkg=Debian 'dpkg' package management program version 1.21.22 (amd64).
gcc=gcc (Debian 12.2.0-14+deb12u1) 12.2.0
git=git version 2.39.5
msgmerge=msgmerge (GNU gettext-tools) 0.21
rpmbuild=RPM version 4.18.0
[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.8.0
DBus=libdbus-1.so.3.32.4
GDK2=libgdk-x11-2.0.so.0.2400.33
GDK3=libgdk-3.so.0.2406.32
GStreamer=libgstreamer-1.0.so.0.2200.0
GTK+2=libgtk-x11-2.0.so.0.2400.33
GTK+3=libgtk-3.so.0.2406.32
OpenGL=libGL.so.1.7.0
Poppler=libpoppler.so.126.0.0
QT5=libQt5Core.so.5.15.8
RSvg=librsvg-2.so.2.48.0
SDL=libSDL2-2.0.so.0.2600.5
SQLite 3=libsqlite3.so.0.8.6
[Environment]
CLUTTER_BACKEND=x11,*
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1003/bus
DESKTOP_SESSION=mate
DISPLAY=:0
EDITOR=pluma
GB_GUI=gb.gtk3
GDMSESSION=mate
GDM_LANG=en_US.utf8
GIO_LAUNCHED_DESKTOP_FILE_PID=1897
GPG_AGENT_INFO=/run/user/1003/gnupg/S.gpg-agent:0:1
GTK3_MODULES=xapp-gtk3-module
GTK_MODULES=gail:atk-bridge:canberra-gtk-module
GTK_OVERLAY_SCROLLING=0
HOME=<home>
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_MEASUREMENT=nl_NL.UTF-8
LC_MONETARY=nl_NL.UTF-8
LC_NUMERIC=nl_NL.UTF-8
LC_PAPER=nl_NL.UTF-8
LC_TIME=nl_NL.UTF-8
LOGNAME=<user>
MATE_DESKTOP_SESSION_ID=this-is-deprecated
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
PWD=<home>
QT_ACCESSIBILITY=1
QT_FONT_DPI=96
QT_LOGGING_RULES=*.debug=false
QT_SCALE_FACTOR=1
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/1476,unix/<hostname>:/tmp/.ICE-unix/1476
SHELL=/bin/bash
SSH_AGENT_PID=1517
SSH_AUTH_SOCK=/run/user/1003/keyring/ssh
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CURRENT_DESKTOP=MATE
XDG_DATA_DIRS=/usr/share/mate:/usr/local/share/:/usr/share/
XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/<user>
XDG_RUNTIME_DIR=/run/user/1003
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=mate
XDG_SESSION_ID=4
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11XDG_VTNR=7

Follow-Ups:
Re: Possible gb.poppler buggbWilly <gbWilly@xxxxxxxxxxxxxx>