[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible gb.poppler bug
[Thread Prev] | [Thread Next]
- Subject: Re: Possible gb.poppler bug
- From: gbWilly <gbWilly@xxxxxxxxxxxxxx>
- Date: Sat, 29 Nov 2025 11:23:31 +0000
- To: gbWilly <gbWilly@xxxxxxxxxxxxxx>
- Cc: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
On Friday, November 28th, 2025 at 14:59, gbWilly <gbWilly@xxxxxxxxxxxxxx> wrote:

While working on a PdfVioewer for Gambos I came across following issue when reading the internal index pagesWhen 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.TextDebug "Action.Type " & hPdfIndex.Action.TypeDebug "Action.Goto.Page " & hPdfIndex.Action.Goto.PageFor Pdf files >= PDF 1.7 the Action.Goto.Page ALWAYS returns 0To 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?
No takers? No one ever created an index for pdf files? Or maybe the issue is unclear?
To clarify the issue maybe this screenshot shows you what I mean. You can see all pages returned are 0. This file is screenshot is in PDF 1.7 format
If pdf files have lower format version I do get pages returned and they are the correct pages, so I can make the TreeView in the left show a page in the right when clicking in the TreeView.
For the file in the screenshot, that of course doesn't work

On Gambas One forum, some have been testing this as well.
Seems that some PDf 1.6 format files do give a page, some don't.
Lower than PDF 1.6 format, so far always returned the proper page, PDF 1.7 never gives the page (always 0).
Maybe the author of gb.poppler could shed a light on the matter?
| Re: Possible gb.poppler bug | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
| Re: Possible gb.poppler bug | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
| Possible gb.poppler bug | gbWilly <gbWilly@xxxxxxxxxxxxxx> |