| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Properties SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Reference > SharpPlot Methods > AddBookmark Method SharpPlot.AddBookmark MethodCreates a bookmark at this point in the output stream. This will be used in PDF output to create an entry in the outline for the document. Overloads
Examplesp.Reset(590,835); // Paper size sp.AddBookmark("January 2006",0,true); DescriptionMulti-page collections of charts may be bookmarked with easily recognised names which can be organised into a tree structure to be shown by the Acrobat Reader as ‘Outlines’. It is also possible to create entries in the outline tree which jump to external resources, typically webpages or other PDFs. The simple form of the command is ... sp.AddBookmark("Sales analysis"); The bookmark will be placed on the next chart to be generated – you may call Making an indented outline for Acrobat ReaderThe outline information is included in the PDF file generated using sp.AddBookmark("'Sales analysis",0); sp.AddBookmark("Europe",1); sp.DrawBarChart(arr_europe); sp.NewPage(); sp.AddBookmark("Asia",1) sp.DrawBarChart(arr_asia); ... and so on. This structure will then appear in the Acrobat Viewer outline bar to the left of the document. By default, sections will be closed on opening the document – you can force the Acrobat Viewer to open a section automatically by appending true as the third parameter to the bookmark call: sp.AddBookmark("Profit and Loss",0,true); sp.AddBookmark("Income breakdown",1,true); sp.AddBookmark("Consulting",2); Linking to webpages or other PDFsYou can add a link to an external resource by including a 4th element in the call, for example: sp.AddBookmark("Home page",0,true,"http://www.grapl.com"); This will allow the user to click on the outline entry and automatically open a web-browser at the page you give. To have Acrobat Reader load another PDF, just use a filename here in place of the url. See also ... |