How to get know text is right aligned or left aligned in PDF

Ask general questions here.
praneet
Posts: 15
Joined: Thu Nov 08, 2018 2:22 am

How to get know text is right aligned or left aligned in PDF

Post by praneet » Fri Jan 25, 2019 1:23 pm

HI,

I need to compare the text alignment whether same or not in 2 PDFs. How can we do in Ranorex 8.3.2
Please help me.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4421
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to get know text is right aligned or left aligned in PDF

Post by odklizec » Fri Jan 25, 2019 1:28 pm

Hi,

Could you please post an example PDFs so we can examine them? There is definitely not an out-of-the-box feature in Ranorex to achieve what you want. But there maybe an attribute in PDF files, which may help with such validation? Unfortunately, it's impossible to suggest something reliable without seeing the PDFs.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

praneet
Posts: 15
Joined: Thu Nov 08, 2018 2:22 am

Re: How to get know text is right aligned or left aligned in PDF

Post by praneet » Fri Jan 25, 2019 1:38 pm

CapturePDF.JPG
CapturePDF.JPG (14.41 KiB) Viewed 64 times
As you can see the crossed text is in blue. That is the text for which i need to get the alignment.
I have another PDF which contains the same text and alignment as above i need to verify whether both are having same alignment or not.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4421
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to get know text is right aligned or left aligned in PDF

Post by odklizec » Fri Jan 25, 2019 1:44 pm

Hi,

I'm sorry, but screenshot of a PDF file is not useful at all. I understand what you want, but without examining the PDF file, there is nothing I (and most probably anyone here) can do or suggest. You see, I don't have a PDF with right aligned text and I'm not willing to search or create such file, which may not be compatible with your PDF. So any suggestion I would make, based on my file, may be irrelevant ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

praneet
Posts: 15
Joined: Thu Nov 08, 2018 2:22 am

Re: How to get know text is right aligned or left aligned in PDF

Post by praneet » Fri Jan 25, 2019 2:14 pm

PDF.zip
(154.09 KiB) Downloaded 4 times
Please find the attachements. The number alignment in pdf1 should be placed at the same position in PDF 2 comment position.
Pls me let me know if u need more details.

DeepikaK
Posts: 1
Joined: Fri Jan 25, 2019 12:43 pm

Re: How to get know text is right aligned or left aligned in PDF

Post by DeepikaK » Sun Jan 27, 2019 10:13 am

Waiting for reply :roll:

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4421
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to get know text is right aligned or left aligned in PDF

Post by odklizec » Mon Jan 28, 2019 9:29 am

Hi,

I'm afraid, I'm unable to track the text in top-right corner of the first PDF file and there seems to be no text in second PDF. Are you able to track the text with Ranorex Spy?

I see both PDF files were created with an old Office (2007) and I'm not quite sure if Office even produces PDF files with correct accessibility support? Without proper accessibility support, Ranorex has no access to PDF file content and there is nothing you can do with such PDF files in Ranorex.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration