Evaluating Amyuni - SetLicenseKey

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
gmeadows
Posts: 4
Joined: Tue Mar 13 2007

Evaluating Amyuni - SetLicenseKey

Post by gmeadows »

Not sure but I do not see where a license key is for evaluation and I believe this is reason for my thrown exception. It fails on a call to the GetPage method. I do not get any build errors.

The file I am attempting to open is in my root directory and is named adobesdk.pdf

Thanks in advance for any assistance.

My code attempts to view a pdf file in my IE 6 web browser and reads as follows:

//////////////////////// SOURCE CODE ///////////////////////////
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;

using Amyuni.PDFCreator;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
acPDFCreatorLib.Initialize();
// acPDFCreatorLib.SetLicenseKey ("Evaluation Version","07EFCDAB01000100C71...28EEE2F79");

PDFCreator pdfCreator = pdfCreator = new PDFCreator();

//open a pdf document from file
FileStream file1 = new FileStream("c:\\adobesdk.pdf", FileMode.Open, FileAccess.Read, FileShare.Read);

IacDocument document = pdfCreator.Document;
document.Open(file1, "");

//switch to design mode before adding objects to the document
document.ReportState = IacReportState.acReportStateDesign;

//create a rectangular frame to add to the document
IacPage page = document.GetPage(1);

IacObject frame = page.CreateObject(IacObjectType.acObjectTypeText, "Frame 1");

//position the frame
frame.AttributeByName("Left").Value = 200;
frame.AttributeByName("Top").Value = 600;
frame.AttributeByName("Right").Value = 2000;
frame.AttributeByName("Bottom").Value = 800;
frame.AttributeByName("Text").Value = "Hello";

// save modified document to a new file (file2)
System.IO.FileStream file2 = new System.IO.FileStream("c:\test3.pdf", FileMode.Create,
FileAccess.Write, FileShare.Read);
document.Save(file2, IacFileSaveOption.acFileSaveView);
file2.Close();

acPDFCreatorLib.Terminate();
}
}
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

The PDF Creator.NET currently can not be embedded within a web page. However, this functionality should be available in the near future.

Hope this helps?
BillN
Posts: 1
Joined: Tue May 01 2007

PDF Creator.Net in ASPX pages

Post by BillN »

Jose,

Is this still not supported?
Post Reply