Where do i place my url in webPDFLoader from langchain?

I’m trying to just load a pdf from a URL. I’m confused how to do so using the webPDFLoader. If anyone has a bit of time, please help explain how to implement this? I would appreciate any help pls.

I’m doing this in nextjs. Where in the webPDFloader section do I put the pdfUrl variable?

"use client";
import React, { useEffect } from "react";
import { WebPDFLoader } from "langchain/document_loaders/web/pdf";
import { guestPdfId } from "@/components/Hero";
import { Document } from "react-pdf";



const bucketId = process.env.NEXT_PUBLIC_APPWRITE_BUCKET_ID!;
const fileId = guestPdfId;
const projectId = process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID!;

const pdfUrl = `https://cloud.appwrite.io/v1/storage/buckets/${bucketId}/files/${fileId}/view?project=${projectId}&mode=admin`;

// webPDFLoader
const blob = new Blob(); // e.g. from a file input

const loader = new WebPDFLoader(blob, {
  // you may need to add `.then(m => m.default)` to the end of the import
  pdfjs: () => import("pdfjs-dist/legacy/build/pdf.js"),
});

docs = loader.load()

const docLen = docs.length()

const ProcessPdf = () => {

  return <div>
    <button onClick={doclen}>Show PDF</button>
</div>;
};

export default ProcessPdf;