Hi, I have in existing pdf file and i would like to add a layer on it (basically a logo picture).
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I am afraid; your requested feature regarding adding layers in existing PDF documents is not supported at the moment. I have created a new feature request in our issue tracking system with issue id: PDFNEWNET-34209. Our development team will further look into this feature and see if it can be supported in near future.
Sorry for the inconvenience,
That’s too bad… thank you very much for your help!
The issues you have found earlier (filed as PDFNEWNET-34209) have been fixed in Aspose.Pdf for .NET 9.3.0.
Blog post for this release can be viewed over this link
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi Jean-Louis,
Document doc = new Document();<o:p></o:p>
Page page = doc.Pages.Add();
Layer layer = new Layer("oc1", "Red Line");
layer.Contents.Add(new Operator.SetRGBColorStroke(1, 0, 0));
layer.Contents.Add(new Operator.MoveTo(500, 700));
layer.Contents.Add(new Operator.LineTo(400, 700));
layer.Contents.Add(new Operator.Stroke());
page.Layers = new ArrayList();
page.Layers.Add(layer);
layer = new Layer("oc2", "Green Line");
layer.Contents.Add(new Operator.SetRGBColorStroke(0, 1, 0));
layer.Contents.Add(new Operator.MoveTo(500, 750));
layer.Contents.Add(new Operator.LineTo(400, 750));
layer.Contents.Add(new Operator.Stroke());
page.Layers.Add(layer);
layer = new Layer("oc3", "Blue Line");
layer.Contents.Add(new Operator.SetRGBColorStroke(0, 0, 1));
layer.Contents.Add(new Operator.MoveTo(500, 800));
layer.Contents.Add(new Operator.LineTo(400, 800));
layer.Contents.Add(new Operator.Stroke());
page.Layers.Add(layer);
doc.Save("34209.pdf");