Amyuni red water maker

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
cguanes21
Posts: 1
Joined: Fri Jul 10 2015

Amyuni red water maker

Post by cguanes21 » Fri Jul 10 2015

I'm not sure what I'm doing wrong but I cannot remove the Amyuni red watermark, it keep showing when I open a PDF with the PDFCreator (and saving)
I'm using version 4.0.8

static void Main()
{
acPDFCreatorLib.Initialize();
String key = "07EFCD...........023C07";
acPDFCreatorLib.SetLicenseKey("My Company Lic Name", key);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}


I'm reading the PDF from a SQL table and at this point just saving to a file, but the file are coming with the watermark.
I verify twice already the License name and the key.

SqlCmd = new SqlCommand(sql, SqlConn);
SqlReader = SqlCmd.ExecuteReader();
if (SqlReader.Read())
{
Int32 nBinSize = int.Parse(SqlReader["Blen"].ToString());
Byte[] btBin = new Byte[nBinSize];
btBin = (Byte[])SqlReader["filebin"];
pdfstream = new MemoryStream(btBin);
pdfstream.Write(btBin, 0, btBin.Length);
MyPDF.Enabled = true;

MyPDF.Document.Open(pdfstream, password);
Application.DoEvents();
MyPDF = RemoveSignature(MyPDF);
MemoryStream CleanedPDF = new MemoryStream();
MyPDF.Document.Save(CleanedPDF);
FileStream fst = null;
string filename = @"C:\Users\username\Desktop\mypdf.pdf";
fst = new FileStream(filename, FileMode.Create);
MyPDF.Document.AttributeByName("FileSaveOption").Value = IacFileSaveOption.acFileSaveView;
MyPDF.Document.Save(fst);
fst.Close();
fst.Dispose();
}


Thank you... I appreciate your help on this.

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Amyuni red water maker

Post by Jose » Mon Jul 13 2015

Hello,

I am assuming that “MyPDF” is a PDF Creator object. If that is the case then you also need to call the SetLicenseKey() on this object.

Example:
MyPDF.SetLicenseKey("My Company Lic Name", key);

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

Post Reply