Validating prints

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
cpalex
Posts: 23
Joined: Sat Feb 17, 2018 12:37 am

Validating prints

Post by cpalex » Wed Sep 11, 2019 10:13 pm

Our AUT has a lot of options in regards to printing, and we are trying to figure out the best way to validate the layout, whether certain things are showing, the value of certain fields, and which page certain objects are on.

What methods are people using to validate things are printing properly?? I have played with printing to PDF, then opening the PDF and validating it, but the only success I have had has been with the GDI capture, which seems to be a little bit inconsistent

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

Re: Validating prints

Post by odklizec » Thu Sep 12, 2019 7:29 am

Hi,

If you don't want to use GDI capture, you must ensure that the PDF is created with enabled accessibility option. But I'm not quite sure if it's doable in your AUT? So it's either GDI capture or properly generated PDF. There is most probably no other way to achieve what you want.
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

cpalex
Posts: 23
Joined: Sat Feb 17, 2018 12:37 am

Re: Validating prints

Post by cpalex » Thu Sep 12, 2019 10:52 pm

Well, it's just a print operation, so we could use any Print to PDF application to generate the PDF. I have yet to find one, though, that prints a PDF I can read properly.

The generic Microsoft Print to PDF does create a PDF, and the "Content Copying for Accessibility" is set to "Allowed", but I still cannot see anything on the PDF when opening it with Adobe Acrobat Reader DC.

Is there a different option I should be looking at? Or a different application I should be opening the PDF with?

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

Re: Validating prints

Post by odklizec » Fri Sep 13, 2019 8:00 am

Hi,

As far as I remember, you should use Adobe Reader for PDF automation. Some other readers (like Foxit) are not working correctly with PDF accessibility. Unfortunately, I can't comment the situation regarding PDF export. Have you tried to import the PDF file from your AUT directly in Adobe Acrobat, check its accessibility options and then examine such file with Ranorex Spy?
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

cpalex
Posts: 23
Joined: Sat Feb 17, 2018 12:37 am

Re: Validating prints

Post by cpalex » Fri Sep 13, 2019 11:12 pm

Like I said, we are able to print to a PDF file using the standard Windows 10 Print to PDF feature. Once the file has been printed to a PDF, I tried opening it with Adobe Acrobat Reader DC. The document properties when viewed in Acrobat Reader do show "Content Copying for Accessibility" as "Allowed", but I am unable to see the elements of the PDF in Acrobat using Spy.

User avatar
RobinHood42
Posts: 302
Joined: Fri Jan 09, 2015 3:24 pm

Re: Validating prints

Post by RobinHood42 » Tue Sep 17, 2019 2:10 pm

Hi,
if enabling the settings you mentioned in your post don't work, I don't think it will work at all with Adobe Reader. Did you already try to open the PDF in Firefox and check if the elements can be tracked there?

Cheers,
Robin