| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Reference SharpPlot Class SharpPlot Properties SharpPlot Methods 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 VectorMath Class DbUtil Class Download Release Notes Licensing |
Common Reference > Document Class > RenderPdf Method Document.RenderPdf MethodReturn document as a PDF stream. The default is to have the document open in the user’s default mode, to embed all non-standard TrueType fonts and to compress the PDF content. You can set the PdfMode to open the outlines window, or to start with the document in full-screen view (useful for presentations). By default, all fonts except the ‘base-14’ set will be embedded in the document automatically. If you are sure that all your potential viewers will have the fonts you have used, then set the noembed list to the names of the safe fonts, for example “Verdana,Perpetua” would be typical. This will make the document very much smaller, and the Acrobat Reader will usually be quite successful in substituting missing fonts if you are unlucky. Overloads
ResultDocument as PDF. Example// Render un-compressed PDF, showing bookmarks pdf = doc.RenderPdf(PdfMode.ShowOutlines,false); Embedding the PDF into a webpageIf you want to write the PDF content directly into a webpage, you should give it the correct content type “application/pdf”, and link to it with an appropriate <embed> tag such as: <embed src="makepdf.aspx" height=300 width=640 type="application/pdf" > The PdfMode parameter of RenderPDF should be set to See also ...SharpPlot.RenderPdf Method | SharpLeaf.RenderPdf Method | Document.Members | Document.SavePdf Method |