Skip to content

PdfGenerator.GeneratePdf failed to add page  #1

Description

@PrakashPaul

PdfDocument document = new PdfDocument(); PdfGenerateConfig config = new PdfGenerateConfig(); config.PageOrientation = PdfSharpCore.PageOrientation.Portrait; config.PageSize = PdfSharpCore.PageSize.A4; config.MarginLeft = 10; config.MarginRight = 10; config.MarginTop = 10; config.MarginBottom = 10; const string filename = "HelloWorld.pdf"; MemoryStream stream = new MemoryStream(); document = PdfGenerator.GeneratePdf(sbHTML.ToString(), config); PdfGenerator.AddPdfPages(document, sbHTML.ToString(), config, null,null); document.Save(@"D:\AForge\" + filename); //UploadFile(stream, filename);

failed with exception "Cannot save a PDF document with no pages"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions