Portal 2014

Open PDF with document key

ActivePDF Portal has reached End of Life.
// Copyright (c) 2018 ActivePDF, Inc.
// ActivePDF Portal 2014
// Example generated 11/15/18 

using System;
using System.Diagnostics;
using System.IO;
using APPortal.Integration;

partial class Example : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    	if (!IsPostBack)
    	{
        PdfStorageAdapter pdfInfo = new PdfStorageAdapter();
        string strDocKey = "0000071FEC4LUCEKQVPKP8EJ3QRHK5UOI";
        
        // This example uses a sample Document Key
        // You will need to get a valid Document Key for this to work
          
        // Open the PDF
        PdfWebControl1.CreateDocument(pdfInfo.GetDocumentProperties(strDocKey).DocumentFileName, pdfInfo.GetDocumentAsPdf(strDocKey));
    	}
    }
  
}

Open PDF with document key.aspx

<%@ Page Language="C#" CodeFile="Open_PDF_with_document_key.aspx.cs" Inherits="Example" %>
<%@ Register Assembly="APPortalUI" Namespace="APPortalUI.Web.UI" TagPrefix="apPortalUI" %>

<!DOCTYPE html>
<html>
<head runat="server">
  <title>activePDF Portal Sample</title>
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <apPortalUI:PdfWebControl id="PdfWebControl1" runat="server" height="600px" width="100%"
         />
    </div>
  </form>
</body>
</html>

Copyright © 2018 ActivePDF, Inc