Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Aug 05, 2019 1:12 pm

Hi, How do I get the rotation direction of the text relative to the page?
Code: Select all
string[] keyArray = new string[] { "text1", "text2", "text3" };
 for(int i=0;i<keyArray.Count();i++)
 {
               PdfTextFind[] resultSum = page.FindText(keyArray[i]).Finds;
               for(int j=0;j<resultSum.Count();j++)
               {
                   PdfTextFind result = resultSum[j];     
                   if (result != null)
                   {
                       RectangleF rectangleF = result.Bounds;

                       PdfPen pen = new PdfPen(PdfBrushes.Black, 1f);
                       PdfBrush brush = PdfBrushes.Red;
                       
                       page.Canvas.DrawRectangle(pen, brush, rectangleF);
                    }           
               }
 }

Image
Image
I want the text to be covered by color blocks,but only text that is in the same direction as the page coordinate system is properly overwritten.They have the same bottom left coordinate,what should I do?
Best regards
WangZhiYu

wangzhy94
 
Posts: 1
Joined: Mon Aug 05, 2019 12:34 pm

Tue Aug 06, 2019 9:47 am

Hi,

Thanks for your inquiry. This is Amber from E-iceblue support team.
1. There is no method to get the rotational direction of the text at present.
2. Spire.Pdf does’t support to cover the rotated text by color blocks now. We will consider adding this new feature into our schedule. Since each document has unique structure, to help us better record you issue, could you please offer us your input pdf file? If there is any update in the future, we will let you know.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Return to Spire.PDF