You are here > Demos > Basic PDF Editor

This demonstration shows how activePDF Portal can be used as a full blown PDF editor, right in the browser window.

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" 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>
using System;
using APPortal;
using APPortalUI;

partial class _Basic : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.PdfWebControl1.CreateDocument("filename", System.IO.File.ReadAllBytes(Server.MapPath(@"pdfs\APPortalSampleForm.pdf")));
        }
    }
}

<%@ Page Language="VB" CodeFile="Basic.aspx.vb" Inherits="_Basic" %>

<%@ Register Assembly="APPortalUI" Namespace="APPortalUI.Web.UI" TagPrefix="apPortalUI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" 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>

Option Explicit On
Option Strict On
Imports APPortalUI.Web.UI

Partial Class _Basic
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not IsPostBack Then

            Me.PdfWebControl1.CreateDocument("filename", System.IO.File.ReadAllBytes(Server.MapPath("pdfs\APPortalSampleForm.pdf")))

        End If
    End Sub
End Class