I have a requirement that I need to add page number to the header or footer.
I have already searched in the forum and the online help ,but only find the operation id "op.document.pageNumbering" which seems to be what I need.
Below is my sample code using operation id "op.document.pageNumbering",which runs well but does not have any impact on the pdf file at all.
Code: Select all
private void AddPageNumbering(PDFXEdit.IPXV_Document Doc, PDFXEdit.PXV_Inst Inst)
{
int nID = Inst.Str2ID("op.document.pageNumbering", false);
PDFXEdit.IOperation op = Inst.CreateOp(nID);
PDFXEdit.ICabNode input = op.Params.Root["Input"];
input.v = Doc.CoreDoc;
PDFXEdit.ICabNode options = op.Params.Root["Options"];
options["ForceLoadFromOptions"].v = true;
PDFXEdit.ICabNode PDFRangeItems = options["PDFRangeItems"];
PDFXEdit.ICabNode item = PDFRangeItems.Add();
item["StartPage"].v = 1;
item["Style"].v = 1;//decimal
item["StartNum"].v = 2;
op.Do();
}
I hope you can help me.I would like to emphasize once more that I need to add the page number to the header(leftheader/centerheader/rightheader) or the footer(leftfooter/centerfooter/rightfooter)
Any help would be appreciated.
Look forward to your reply.
Thanks in advance.