I'm using PDF Creator .NET 4.0.1.1 and trying to open an existing PDF (think of it as a "model"), write some text over it at given places and finally save it back to PDF with a given name.
I don't get errors, all seems to work, but what I wrote appears "behind" the existing elements.
The "source" file is a PDF1.5 and appears not to be encrypted.
I've also tried to print it through a PDF driver so to get a PDF1.4, but I get to the same unhappy ending.
What am I missing?
Is there something I can try to get around this strange issue?
Is there a way to set some kind of "z-index" (like you could do in CSS, for instance) for my newly inserted text elements?
Thanks in advance for the help!
Luca
PS: what I did, in short:
Code: Select all
acPDFCreatorLib.Initialize ();
acPDFCreatorLib.SetLicenseKey("name","0123....789");
IacDocument document = new IacDocument(null);
FileStream file1 = new System.IO.FileStream(....);
document.Open(file1, "");
document.ReportState = IacReportState.acReportStateDesign;
IacPage page = document.GetPage(2);
using (IacObject frame = page.CreateObject(IacObjectType.acObjectTypeText, "Partita IVA"))
{
frame.AttributeByName("Text").Value = "sample text";
frame.AttributeByName("Left").Value = 500;
frame.AttributeByName("Top").Value = 500;
frame.AttributeByName("Right").Value = 2200;
frame.AttributeByName("Bottom").Value = 600;
}
using (FileStream file2 = new FileStream(...))
{
file2.Close();
}
acPDFCreatorLib.Terminate ();