Save To PDF

Posted by: vecdiatayilmaz on 19 December 2025, 4:36 am EST

  • Posted 19 December 2025, 4:36 am EST

    Hello,

    I am writing from Türkiye and we want to purchase ComponentOne. We want to upload a PDF to test our Forms but we are getting an error. Please help us by writing this code. Thank you.

    Private Sub C1PreviewPane1_btnFileSave1_Click(sender As Object, e As EventArgs) Handles C1PreviewPane1_btnFileSave1.Click

    C1PreviewPane1.ExportToPDF(“c:\temp\C1Preview.pdf”, True, True)

    ’ C1PrintDocument1.ToString()

    End Sub

    we have C1PrintDocument1 and C1PreviewPane1_fileStrip1

  • Posted 22 December 2025, 5:08 am EST

    Hello Vecdi,

    Thank you for reaching out to Mescius Support.

    Based on the code you shared, you are attempting to export the document displayed in C1PreviewPane to PDF by calling an ExportToPDF method. However, this method does not exist in the C1PreviewPane API.

    To export the PrintDocument that is being previewed in the C1PreviewPane to a PDF file, you can use the Export method provided by C1PrintDocument instead. You can find the relevant documentation at the link below:

    https://developer.mescius.com/componentone/api/win/online-printdocument/dotnet-api/C1.PrintDocument.10/C1.C1Preview.C1PrintDocument.Export.html

    If you continue to face issues, please let us know which specific controls you are using so we can guide you with exact method.

    Regards,

    Prabhat Sharma

Need extra support?

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

Learn More

Forum Channels