![]() CreateGraphics ( page ) //Draw ellipse graphics. Add ( "Layer" ) //Create graphics for layer PdfGraphics graphics = layer. Add () //Add the layer PdfLayer layer = document. Create new PDF document PdfDocument document = new PdfDocument () //Add page PdfPage page = document. Windows ) Adding annotation to layerĮssential PDF allows the users to add Annotation to layers in the PDF document. Please refer PDF/Xamarin section for respective code samples. Close ( true ) //Save the stream into pdf file //The operation in Save under Xamarin varies between Windows Phone, Android and iOS platforms. MemoryStream stream = new MemoryStream () document. DrawEllipse ( pen, bounds ) //Save the document into stream. TranslateTransform ( 100, 180 ) //Draw ellipse. DrawArc ( pen, bounds, 360, 360 ) //Add another layer on the page. Red, 50 ) RectangleF bounds = new RectangleF ( 0, 0, 50, 50 ) graphics. TranslateTransform ( 100, 60 ) //Draw arc. Add ( "Layer1" ) PdfGraphics graphics = layer. PdfDocument document = new PdfDocument () PdfPage page = document. return File ( stream, contentType, fileName ) string fileName = "Output.pdf" //Creates a FileContentResult object by using the file contents, content type, and file name. string contentType = "application/pdf" //Define the file name. Close ( true ) //Defining the ContentType for pdf file. DrawEllipse ( pen, bounds ) //Save and close the document MemoryStream stream = new MemoryStream () document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |