diff --git a/src/routes/documents.pleading.new.tsx b/src/routes/documents.pleading.new.tsx index 7ada058..702ddf8 100644 --- a/src/routes/documents.pleading.new.tsx +++ b/src/routes/documents.pleading.new.tsx @@ -15,7 +15,7 @@ import { Switch } from "@/components/ui/switch"; import { FL_CIRCUITS } from "@/lib/florida"; import { Packer } from "docx"; import { buildPleadingDoc, downloadPleading, type PleadingFootnote, type PleadingSignature, type ServiceContact } from "@/lib/docx-pleading"; -import { downloadPleadingPdf } from "@/lib/pdf-pleading"; +import { downloadPleadingPdf, buildPleadingPdfBlob } from "@/lib/pdf-pleading"; import { RichTextEditor } from "@/components/documents/rich-text-editor"; import { ContactPickerPopover } from "@/components/clients/contact-picker-popover"; import { supabase } from "@/integrations/supabase/client"; @@ -276,10 +276,6 @@ function PleadingNewPage() { mimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; ext = "docx"; } else { - // Generate PDF blob via downloadPleadingPdf path — but we need the bytes, - // so build it inline mirroring the helper. The helper saves directly, - // so we use a workaround: dynamically import jsPDF output. - const { buildPleadingPdfBlob } = await import("@/lib/pdf-pleading"); blob = await buildPleadingPdfBlob(input); mimeType = "application/pdf"; ext = "pdf";