Preview PDF without saving first

Originally Posted 1 August 2017, 1:35 pm EST

  • Originally Posted 1 August 2017, 1:35 pm EST

    Is there a way to create a PDF using C1PdfDocument and, WITHOUT SAVING IT TO DISK, send it to C1PdfDocumentSource using "LoadFromStream()"?

    Is there any OTHER way to preview a PDF created using C1PdfDocument WITHOUT SAVING IT TO DISK first?

    Thanks.
    -- Paul
  • Reply

    Hello Paul,

    For saving the PDF to stream using C1PDF, you may use C1PDF's Save method as follows:
    Dim stream As MemoryStream = New MemoryStream()
    C1PdfDocument1.Save(stream)
    stream.Seek(0, SeekOrigin.Begin)
    C1PdfDocumentSource1.LoadFromStream(stream)

    I have attached a small sample application for your reference.

    Regards,
    Ruchir Agarwal

    2017/08/prj_C1PDF.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels