Reputation: 3296
I'm trying to update pdfjs-dist. As of writing, I'm migrating from 2.5.207 to the latest version (4.6.82).
Things that were publicly exported before appear to have gone missing with no replacement. As far as I can tell, Mozilla doesn't provide any deprecation warnings nor a migration path.
Specifically, these have gone missing:
import { PDFThumbnailViewer } from 'pdfjs-dist/lib/web/pdf_thumbnail_viewer';
import { getVisibleElements } from 'pdfjs-dist/lib/web/ui_utils';
import { PDFViewerParams, PDFSource, PDFProgressData, } from 'pdfjs-dist';
How do I update my code using pdfjs-dist so that functionality dependent on the above imports will continue to work?
I cloned pdf.js and searched for the imports I'm looking for. Most of the imports are missing. Some that seem like they should be accessible are not, such as getVisibleElements
, which I can find in ui_utils.js
.
I've also reached out on a couple of community posts on their github.
Upvotes: 0
Views: 369