WebViewer PDF OnlyForPrint

Posted by: stacey.manske on 16 July 2020, 1:35 am EST

  • Posted 16 July 2020, 1:35 am EST

    I'm upgrading ActiveReports from version 12 to 14 and was using the WebViewer flash startprint option to automatically bring up the print dialog.
    Updating the viewer and switching to the PDF OnlyForPrint works but when you print and then click a link to go to another page and then use the back button, the print dialog with the report pops up again. Is there any way to prevent that?
  • Marked as Answer

    Replied 16 July 2020, 10:38 pm EST


    You can use the following line of code to prevent that:
    public string test
    return (string)Session["test"] ?? "hi";
    Session["test"] = value;
    protected void Page_Load(object sender, EventArgs e)

    this.WebViewer1.PdfExportOptions.OnlyForPrint = (bool)Session["print"];

    protected void Button1_Click(object sender, EventArgs e)
    Session["test"]= "test";
    Session["print"] = false;

Need extra support?

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

Learn More

Forum Channels