1import{_ as h}from"./index-4oNBKKat.js";import{w as b}from"./pdf.worker-CldE9Ecx.js";async function P(l,a){const{getDocument:g,GlobalWorkerOptions:p}=await h(async()=>{const{getDocument:t,GlobalWorkerOptions:e}=await import("./pdf-DvlX-tVE.js");return{getDocument:t,GlobalWorkerOptions:e}},[]);p.workerSrc=b;const n=await g({data:l}).promise,w=a.pages?.length?a.pages:Array.from({length:n.numPages},(t,e)=>e+1),s=[];for(const t of w){if(t<1||t>n.numPages)continue;const e=await n.getPage(t),r=e.getViewport({scale:a.scale}),o=document.createElement("canvas");o.width=Math.ceil(r.width),o.height=Math.ceil(r.height);const i=o.getContext("2d");if(!i)throw new Error("Unable to create canvas context for conversion.");await e.render({canvasContext:i,viewport:r,canvas:o}).promise;const m=await new Promise((u,d)=>{o.toBlob(c=>{if(!c){d(new Error("Failed to generate JPG blob."));return}u(c)},"image/jpeg",a.quality)});s.push(m)}return await n.destroy(),s}export{P as pdfToJpgInBrowser};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.