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.
Amyuni red water maker
Re: Amyuni red water maker
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
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