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
Validating prints
Re: Validating prints
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.
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 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
Re: Validating prints
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?
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?
Re: Validating prints
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?
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 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
Re: Validating prints
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.
- RobinHood42
- Posts: 324
- Joined: Fri Jan 09, 2015 3:24 pm
Re: Validating prints
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
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
Re: Validating prints
Firefox, Edge, Chrome, Adobe PDF... None of them really work.
We really need a solid solution for validating printouts, and I'm beginning to suspect it is out of the reach of Ranorex.
Does anyone have any experience with PDF comparison tools? We could easily have a reference PDF for comparing, though the date and time would change, so the tool needs to be a little more robust than a 1:1 comparison
We really need a solid solution for validating printouts, and I'm beginning to suspect it is out of the reach of Ranorex.
Does anyone have any experience with PDF comparison tools? We could easily have a reference PDF for comparing, though the date and time would change, so the tool needs to be a little more robust than a 1:1 comparison
Re: Validating prints
Hi,
I'm afraid, that without seeing the PDF in question, it's impossible to suggest anything reasonable. I personally think that the most important part of equation is correct PDF export, with supported version of Adobe Acrobat and required accessibility settings. If the individual PDF elements are not "readable" by Ranorex, then the PDF file is most probably not exported correctly or exported with unsupported version of Adobe Acrobat or 3rd party PDF exporter, which is not supported? You best hope is to contact Ranorex support (via support form) and provide them with problematic PDF, so they can analyze it and suggest what to do.
I'm afraid, that without seeing the PDF in question, it's impossible to suggest anything reasonable. I personally think that the most important part of equation is correct PDF export, with supported version of Adobe Acrobat and required accessibility settings. If the individual PDF elements are not "readable" by Ranorex, then the PDF file is most probably not exported correctly or exported with unsupported version of Adobe Acrobat or 3rd party PDF exporter, which is not supported? You best hope is to contact Ranorex support (via support form) and provide them with problematic PDF, so they can analyze it and suggest what to do.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Validating prints
Well, it's simple enough for me to attach a zipped up PDF with the files, so I have attached it to this post
You do not have the required permissions to view the files attached to this post.
Re: Validating prints
Hi,
I've checked the PDF you posted and it's exactly what I'd expected it to be. If you use Adobe Acrobat Reader, you should be able to extract and validate individual PDF texts. It won't be an easy task, because there is a lot of texts found by Spy and many of them are duplicated. So you must either find a good xpath, which returns only texts you are interested in, or you must validate them all. But it should not be a problem if you develop a code doing this for you? In any case, there is no reasonable way validating PDF files without code. If you are hoped for validating PDF via web browser or 3rd party PDF reader, you are most probably out of luck here. Adobe Acrobat Reader appears to be the only viable option.
I've checked the PDF you posted and it's exactly what I'd expected it to be. If you use Adobe Acrobat Reader, you should be able to extract and validate individual PDF texts. It won't be an easy task, because there is a lot of texts found by Spy and many of them are duplicated. So you must either find a good xpath, which returns only texts you are interested in, or you must validate them all. But it should not be a problem if you develop a code doing this for you? In any case, there is no reasonable way validating PDF files without code. If you are hoped for validating PDF via web browser or 3rd party PDF reader, you are most probably out of luck here. Adobe Acrobat Reader appears to be the only viable option.
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Validating prints
Maybe I just didn't have the GDI capture on before for Acrobat...
But now I'm getting an IPC error when I get to it.
Guess it's time to update to 9.2.1 (Still on 9.1.2) and see if that fixes it
But now I'm getting an IPC error when I get to it.
Guess it's time to update to 9.2.1 (Still on 9.1.2) and see if that fixes it
Re: Validating prints
Hi,
You should definitely try updating Ranorex to 9.2.1, but I'm not quite sure it will fix your new problem with IPC error (there is discussed similar problem here). In fact, there is absolutely no need to use GDI capture with Acrobat Reader! I've tried to load your PDF in AA version 2015 and I was able to track the individual elements with standard Spy tracking, i.e. without GDI capture. So no, GDI capture is not required for tracking PDF elements in AA.
You should definitely try updating Ranorex to 9.2.1, but I'm not quite sure it will fix your new problem with IPC error (there is discussed similar problem here). In fact, there is absolutely no need to use GDI capture with Acrobat Reader! I've tried to load your PDF in AA version 2015 and I was able to track the individual elements with standard Spy tracking, i.e. without GDI capture. So no, GDI capture is not required for tracking PDF elements in AA.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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