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();
}
}
Evaluating Amyuni - SetLicenseKey
PDF Creator.Net in ASPX pages
Jose,
Is this still not supported?
Is this still not supported?