PdfSharpCore icon indicating copy to clipboard operation
PdfSharpCore copied to clipboard

Exception error proyect .Net Maui

Open x71hicks opened this issue 2 years ago • 3 comments

proyect en net.maui in Net 7.0

{ String filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "xxx.pdf");

Document document = new Document();

Section section = document.AddSection();

        Paragraph paragraph = section.AddParagraph();

        paragraph.Format.Font.Color = Color.FromCmyk(100, 30, 20, 50);

        paragraph.AddFormattedText("Hello, World!", TextFormat.Bold);

        PdfDocumentRenderer printer = new PdfDocumentRenderer();
        printer.Document = document;
        printer.RenderDocument();  **--> line exception**
        printer.PdfDocument.Save(filePath);

        await Launcher.OpenAsync(new OpenFileRequest
        {
            File = new ReadOnlyFile(filePath)
        });

}

System.ArgumentNullException: 'Value cannot be null. (Parameter 'stream')'

thank you

x71hicks avatar Jan 26 '23 00:01 x71hicks

I have the same error.

AlessandroLanzoni avatar Feb 16 '23 11:02 AlessandroLanzoni

Do you guys find any fix for this?

the-crow-club avatar Aug 09 '23 15:08 the-crow-club

No, I wait for an Update targets .net 8

AlessandroLanzoni1991 avatar Nov 01 '23 11:11 AlessandroLanzoni1991