Closed farling42 closed 1 year ago
pdfviewerapp.pdfOutlineViewer._outline
is an array.
{
title : string;
items: Array (sub-menu)
dest: Array - probably points to location in PDF
}
JournalSheet.getData() sets data.toc = this._pages = this._getPageData(); JournalEntryPage.toc() JournalEntryPage.buildTOC()
Copying the link from the Outline gives:
https://foundry10.amusingtime.uk/scripts/pdfjs/web/viewer.html?file=%2Fuserdata%2Fstar-trek-adventures%2FStar_Trek_Adventures_Quickstart.pdf#%5B%7B%22num%22%3A394%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22FitV%22%7D%2C-274%5D
Although the href in the outline link only contains the stuff after "#"
Links within PDF seem to generate
<doclink>#[{"num":363,"gen":0},{"name":"FitV"},-274]
The bit after #
is JSON.stringify(toc.dest)
Implemented in 0.28.0
Read the Document Outline from the PDF and present as the TOC for the page. This will involve loading the PDF first (which probably occurs anyway when they select the page).