Get Text Rotation from PDF

Hi Team

Is it is possible to get text rotation from the existing pdf and also I would like to get the CYMK color from PDF text


Thanks in advance
Balamurugan V

V.Balamurugan: Is it is possible to get the text rotation from the existing PDF?

Hi Balamurugan,

Thanks for contacting support. I am afraid currently Aspose.Pdf for .NET does not support the feature to get the Text rotation information from PDF file. However, please share the sample PDF file so that we can further look into this requirement.

V.Balamurugan: also I would like to get the CMYK color from PDF text

Aspose.Pdf for .NET supports the feature to get ForegroundColor and ColorSpace of Text inside PDF file.

[C#]

// open document
Document pdfDocument = new Document("c:/pdftest/Algorithms.pdf");

// create TextAbsorber object to find all instances of the input search phrase
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber("PART");

// accept the absorber for all the pages
pdfDocument.Pages[4].Accept(textFragmentAbsorber);

// get the extracted text fragments
TextFragmentCollection textFragmentCollection = textFragmentAbsorber.TextFragments;

// loop through the fragments
foreach (TextFragment textFragment in textFragmentCollection) {
    Console.WriteLine("Text : {0} ", textFragment.Text);
    Console.WriteLine("Foreground Color : {0} ", textFragment.TextState.ForegroundColor);
    Console.WriteLine("Foreground ColorSpace : {0} ", textFragment.TextState.ForegroundColor.ColorSpace);
}