GNU bug report logs -
#73530
[PATCH] Add imenu index function for Djvu files in doc-view
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Sat, 28 Sep 2024 15:12:02 UTC
Severity: wishlist
Tags: patch
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Visuwesh <visuweshm <at> gmail.com> writes:
>> Unfortunately, I didn't find a PDF nor DjVu document on my computer
>> where an index can be built. I have the relevant tools installed but
>> get the message that no index can be built for that document and
>> doc-view--outline becomes 'unavailable.
>>
>> I've tried various PDFs generated by LaTeX with many section,
>> subsections, etc.
>
> The PDF generated by LaTeX can have a wildly different outline than
> matched by doc-view's regexp:
>
> % mutool show test.pdf outline
> | "Text" #nameddest=section.1
> | "Annotations" #nameddest=section.2
>
> Compare it with:
>
> % mutool show atkins_physical_chemistry.pdf outline
> | "Cover" #page=1&view=Fit
> | "PREFACE" #page=7&view=Fit
> | "USING THE BOOK" #page=8&view=Fit
Ok, I see. All my LaTeX PDFs have #nameddest=section.x values instead
of #page=X values, so that's the reason they don't work. It would be
good if we could mention that it won't work because there are no page
references in the outline in the error message.
>> For DjVu, my sample size is 1, and that's a presentation, so at least
>> here I'm not sure if there should be an index available...
>
> I will send the link to the DjVu file that I wrote the feature for
> off-list. I will send a link to a PDF file too.
Thanks, will try with those two files.
> On this note, should we use doc-view-pdfdraw-program in place of mutool
> in doc-view--pdf-outline?
Yes, but only if the older names pdfdraw and mudraw already had the
"show <file> outline" feature.
>> Well, I actually have no strong opinion here. Technically, I like
>> your approach better because of its simplicity. I would like to test
>> with some larger documents to see how long index building takes,
>> though.
>
> I tried the function with a large PDF file:
Will try with the large two you've linked later.
Thanks,
Tassilo
This bug report was last modified 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.