Print line annotations

I’ve added horizontal lines to each page and I want to print it out but when I use the following code the line wont print out. Here is the code I use:


Aspose.Pdf.Document pdf = new Aspose.Pdf.Document(“in.pdf”);
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf(pdf);

for (int i = 1; i <= pdf.Pages.Count; i++)
{
editor.CreateLine(new System.Drawing.Rectangle(0, 0, 100, 100), “Welcome to Aspose”,
70, float.Parse(pdf.Pages[i].PageInfo.Margin.Bottom.ToString()),
float.Parse((pdf.Pages[i].Rect.Width - 70).ToString()),
float.Parse(pdf.Pages[i].PageInfo.Margin.Bottom.ToString()),
i, 0, System.Drawing.Color.Black, “S”, null, new string[] { “None”, “None” });
}

PdfViewer viewer = new PdfViewer(pdf);
viewer.PrintDocument();

I’ve already checked the annotationflags which seems “Print”.
Please help to print out these line annotations.

Thanks

Hi Peter,


Thanks for using our products.

I
have tested the scenario and I am able to reproduce the same problem that PdfViewer is not printing the annotations created with PdfContentEditor class. For the
sake of correction, I have logged it in our issue tracking system as PDFNEWNET-35407. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We apologize for your inconvenience.