I would like to evaluate DocuVieware being integrated within our ASP.NET MVC application and would just like to ask a few questions.
I need to add annotations to a PDF programmatically. I see this can be done through JavaScript or through a Custom Action on the Server-Side. What I could not figure out is how to add an annotation(for example a footer) to every page of the PDF but also allow that annotation to be moved. The following code only adds the annotation to the first page. What am I doing wrong?
Code: Select all
GdPicturePDF gdPicturePDF = new GdPicturePDF();
customActionEventArgs.docuVieware.GetNativePDF(out gdPicturePDF);
var pages = gdPicturePDF.GetPageCount();
for (int page = 1; page < gdPicturePDF.GetPageCount(); page++)
{
gdPicturePDF.SelectPage(page);
annotationManager.SelectPage(page);
var id = "footer_page_" + page.ToString();
CleanAnnotation(annotationManager, id );
AnnotationText myAnnot = annotationManager.AddTextAnnot(0.2f, 0.2f, 3.0f, 0.2f, "FOOTER");
myAnnot.AutoSize = true;
myAnnot.Fill = false;
myAnnot.Stroke = false;
myAnnot.FontName = "Courier New";
myAnnot.ForeColor = Color.Red;
myAnnot.FontSize = 20;
myAnnot.CanEditText = false;
myAnnot.Tag = id;
annotationManager.SaveAnnotationsToPage();
customActionEventArgs.docuVieware.RedrawPage();
customActionEventArgs.docuVieware.ReloadAnnotations();
}