Features in TaggedPDF

Hi Aspose Support,
Please help me with the following issues-

1)How to connect Page and taggedContent. The methods suggested in the aspose documentation doesnt use the Page object while generating PDF. While technically its possible to generate a PDF without Page object, it creates lot of limitations like not able to set the X,Y limits of the page, setting margins of page and choosing which contents to appear on which page. So it doesnt serve the very basic purpose of PDF Generation

2)For an image in taggedPDF(I am using FigureElement-hope that is the correct way), how to set the vertical alignment, horizontatl alignment and margin.

@abrahamaby,

I couldn’t find a way to do what you needed but when I found a way to place the items in a specific position, it didn’t work correctly. So I will be creating a bug for the dev team.

This was the sample I tried but failed in case you want to take a look at it:

private void Logic()
{
    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 = "Sample Logo";
    figure1.Title = "Image 1";
    figure1.SetTag("Figure1");
    
    // Add image with resolution 300 DPI (by default)
    figure1.SetImage($"{PartialPath}_input.jpg");            
    
    var layoutAttributes = figure1.Attributes.CreateAttributes(AttributeOwnerStandard.Layout);
    var placementAttribute = new StructureAttribute(AttributeKey.Placement);
    
    placementAttribute.SetNameValue(AttributeName.Placement_Start);

    var rectangle = new Aspose.Pdf.Rectangle(300, 300, 400, 400);

    placementAttribute.SetRectangleValue(rectangle);
    

    layoutAttributes.SetAttribute(placementAttribute);

    // Save PDF Document
    document.Save($"{PartialPath}_output.pdf");
}

@abrahamaby
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-53857

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.