From PDF XChange PDF SDK
Jump to: navigation, search


The operation allows to send the notification to all of the listeners that the bookmarks were manually added.


Name Type Description
Input Array Array of IUnknown-based objects containing the IPXC_Bookmark objects that need to be updated. Note that all of the bookmarks must belong to one document.
Output Array Array of IUnknown-based objects containing the IPXC_Document of the updated bookmarks. Not yet implemented.


private void AddBookmarksFromCoreLevel(PDFXEdit.IPXV_Document Doc, PDFXEdit.IPXV_Inst Inst)
	int nID = Inst.Str2ID("op.bookmarks.addNew.simple", false);
	PDFXEdit.IOperation Op = Inst.CreateOp(nID);
	PDFXEdit.ICabNode input = Op.Params.Root["Input"];
	//Adding two bookmarks to the Bookmarks Root from The Core Level
	PDFXEdit.IPXC_Bookmark Book = Doc.CoreDoc.BookmarkRoot.AddNewChild(true);
	PDFXEdit.IColor color = Book.Color;
	color.SetRGB(0.5f, 0.1f, 1.0f);
	Book.Color = color;
	Book.Opened = true;
	PDFXEdit.IPXC_ActionsList AL = Doc.CoreDoc.CreateActionsList();
	PDFXEdit.PXC_Destination dest = new PDFXEdit.PXC_Destination();
	dest.nPageNum = 0;
	dest.nNullFlags = 15;
	dest.nType = PDFXEdit.PXC_DestType.Dest_XYZ;
	Book.Actions = AL;
	Book.Title = "First Bookmark";
	input.Add().v = Book;

	Book = Doc.CoreDoc.BookmarkRoot.AddNewChild(true);
	Book.Style = PDFXEdit.PXC_BookmarkStyle.BookmarkFont_BoldItalic;
	Book.Title = "Last Bookmark";
	input.Add().v = Book;
	//Executing operation from the Editor Level to notify all of the UI items that the bookmarks were added