public static void Run() { // ExStart:IllustrationStructureElements // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments(); // Create Pdf Document Document document = new Document(); // Get Content for work with TaggedPdf ITaggedContent taggedContent = document.TaggedContent; // Set Title and Language for Documnet taggedContent.SetTitle("Tagged Pdf Document"); taggedContent.SetLanguage("en-US"); // Under Development IllustrationElement figure1 = taggedContent.CreateFigureElement(); taggedContent.RootElement.AppendChild(figure1); figure1.AlternativeText = "Figure One"; figure1.Title = "Image 1"; figure1.SetTag("Fig1"); figure1.SetImage("image.png"); // Save Tagged Pdf Document document.Save(dataDir + "IllustrationStructureElements.pdf"); // ExEnd:IllustrationStructureElements }
public static void Run() { // ExStart:CreatePDFwithTaggedImage // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdf_WorkingDocuments(); Document document = new Document(); ITaggedContent taggedContent = document.TaggedContent; taggedContent.SetTitle("CreatePDFwithTaggedImage"); taggedContent.SetLanguage("en-US"); IllustrationElement figure1 = taggedContent.CreateFigureElement(); taggedContent.RootElement.AppendChild(figure1); figure1.AlternativeText = "Aspose Logo"; figure1.Title = "Image 1"; figure1.SetTag("Fig"); // Add image with resolution 300 DPI (by default) figure1.SetImage(dataDir + @"aspose-logo.jpg"); // Save PDF Document document.Save(dataDir + "PDFwithTaggedImage.pdf"); // ExEnd:CreatePDFwithTaggedImage }