//// This code is part of Document Solutions for PDF .NET demos.// Copyright (c) MESCIUS inc. All rights reserved.//usingSystem.IO;usingSystem.Drawing;usingGrapeCity.Documents.Pdf;usingGrapeCity.Documents.Text; namespaceDsPdfWeb.Demos{// One of the simplest ways to create a "Hello, World!" PDF with DsPdf.publicclassHelloWorld {publicintCreatePDF(Stream stream) {// Create a new PDF document:var doc = newGcPdfDocument();// Add a page, get its graphics:var g = doc.NewPage().Graphics;// Draw a string on the page.// Notes:// - For simplicity, here we are using a standard PDF font// (the 14 standard fonts' metrics are built into DsPdf and are always available);// - DsPdf coordinates start at top left corner of a page, using 72 dpi by default: g.DrawString("Hello, World!",newTextFormat() { Font = StandardFonts.Times, FontSize = 12 },newPointF(72, 72));// Save the PDF: doc.Save(stream);return doc.Pages.Count; } }}