I may have found a bug with Links and Place holders:
phMWILetter is a placeholder in my report.
private void phMWILetter_LaidOut(object sender, PlaceHolderLaidOutEventArgs e) {
string text = "MWI letter to customers, Nov 2006";
Font font = Font.Helvetica;
// Create the link's label
ceTe.DynamicPDF.PageElements.Label label = new ceTe.DynamicPDF.PageElements.Label(text, 0, 0, e.ContentArea.Width, e.ContentArea.Height, font, 10,
RgbColor.Blue);
label.Underline = true;
// Set the action then create the link
UrlAction action = new UrlAction("http://store.mwivet.com/files/PedigreeCommunication.pdf");
Link link = new Link(0, 0, e.ContentArea.Width, e.ContentArea.Height, action); //font.GetTextWidth(text, 10), 20
e.ContentArea.Add(link);
e.ContentArea.Add(label);
}
If you look at the output, the label will be placed at the 0,0 position relative to the placeholder (thats what shows up on my screen anyways), but the link when added, is place at 0,0 relative to the page, not the placeholder. I had to swap 0,0 on the Link to be at e.ContentArea.X and e.ContentArea.Y in order for it to overlay the label, and correctly link.
I also at one time added a Rectangle, at 0,0 and it was placed correctly relative to the content area.
Just and FYI.
Links and Placeholders
Re: Links and Placeholders
Support · Dec 12, 2007Hello,
In v4.0 of our product, the Link page element gets added relative to the upper left corner of the Page. In v5.0 this will not be the case and you can add the Link to the Group or Placeholder without any problem.
We have the beta DLL files ready that will allow this. If you are interested in receiving the beta DLL files, please send an email to our [^a|mailto:support@cete.com|Support Team^].
Thanks,
ceTe Software Support Team
Re: Links and Placeholders
Forum member · Feb 5, 2008I'm having an issue where I can see this event fire, but only the label appears and there is no active link for me to click. Any help is greatly appreciated! Here's my event code...
protected void PlaceholderEmail_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
{
string text = "Email Coupons To A Friend";
Font font = Font.Helvetica;
// Create the link's label
ceTe.DynamicPDF.PageElements.Label label = new ceTe.DynamicPDF.PageElements.Label(text, 0, 0, 347, 20, font, 18,
RgbColor.Blue);
label.Underline = true;
label.Align = TextAlign.Center;
// Set the action then create the link
UrlAction action = new UrlAction("http://www.granza.com");
Link link = new Link(e.ContentArea.X, e.ContentArea.Y, e.ContentArea.Width, e.ContentArea.Height, action); //font.GetTextWidth(text, 10), 20
e.ContentArea.Add(link);
e.ContentArea.Add(label);
}
Re: Links and Placeholders
Support · Feb 6, 2008Hello,
We have a pre Beta build v5.0 which has a fix for this issue. Using this dll you can add the links in place of the placeholder.
If any one is interested to get this dll then please send a mail to our [^a|mailto:support@cete.com|Support Team^] so that they can send you the dll.
Thanks,
ceTe Software Support Team.
Re: Links and Placeholders
Forum member · Feb 6, 2008Thank you! This DID solve my problem. However, I am now getting the unlicensed watermark and when I checked for the key on your website it hasn't changed from what I have in my web.config file. Any help on that?
Re: Links and Placeholders
Support · Feb 6, 2008Hello,
This is a pre beta dll and it will produce the watermark on the PDFs. The licensed dlls are not yet released which can remove the watermark.
Thanks,
ceTe Software Support Team.