GitOrigin-RevId: 394d63571d83302b91b5719389adf49155218bc7
@@ -33,7 +33,10 @@ const FileViewPdf: FC<{
return
}
- const pdf = await PDFJS.getDocument(preview.url).promise
+ const pdf = await PDFJS.getDocument({
+ url: preview.url,
+ isEvalSupported: false,
+ }).promise
// bail out if loading the PDF took too long
if (!mountedRef.current) {
@@ -96,6 +96,7 @@ export default class PDFJSWrapper {
rangeChunkSize,
disableAutoFetch: true,
disableStream,
textLayerMode: 2, // PDFJSViewer.TextLayerMode.ENABLE,
range: rangeTransport,
})
@@ -143,7 +143,7 @@ export class GraphicsWidget extends WidgetType {
- const pdf = await PDFJS.getDocument(url).promise
+ const pdf = await PDFJS.getDocument({ url, isEvalSupported: false }).promise
const page = await pdf.getPage(1)