# Visual Testing Supports PDF to PDF comparison 

**URL:** <https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [October 7, 2022, 2:15am UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339 "2022-10-07T02:15:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmadhusudhananprabak](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kmadhusudhananprabak/32/20464_2.png) [@kmadhusudhananprabak](https://forum.katalon.com/u/kmadhusudhananprabak)\
**Post date:** [October 7, 2022, 2:15am UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339/1 "2022-10-07T02:15:10Z")

</div>

I got email recently about Visual testing. Wondering does Katalon Supports PDF to PDF visual comparison testing like do in other tools like Applitools. Please share some thoughts

---

<div class="post-metadata">

**Author:** ![nghi.hua](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/nghi.hua/32/23870_2.png) [@nghi.hua](https://forum.katalon.com/u/nghi.hua)\
**Post date:** [October 14, 2022, 8:17am UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339/2 "2022-10-14T08:17:40Z")

</div>

Thank you very much for your interest in Visual Testing.

Currently, the PDF comparison has not been developed. Please share with us how important that feature is, we might have the workaround to support you.

---

<div class="post-metadata">

**Author:** ![kmadhusudhananprabak](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kmadhusudhananprabak/32/20464_2.png) [@kmadhusudhananprabak](https://forum.katalon.com/u/kmadhusudhananprabak)\
**Post date:** [October 14, 2022, 1:24pm UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339/3 "2022-10-14T13:24:19Z")

</div>

thanks for your reply. We have lot of PDF templates to validate every day if katalon able to provide some options to compare base and actual PDF validation like Web would be good. We are looking for solution actively on this to automate this process instead of scraping content and validate in other way.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 14, 2022, 8:43pm UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339/4 "2022-10-14T20:43:01Z")

</div>

There would be a way, though it is long to go.

You can develop some way to convert a PDF to HTML, and convert the HTML to PNG images. Then you can use Visual Testing to compare the resulting PNG images. This will effectively compare the original PDFs.

The following post descibes a sample where I converted a PDF to HTML.

> [@How to assert on content of downloaded PDF file](http://forum.katalon.com/t/how-to-assert-on-content-of-downloaded-pdf-file/78469):
>
> Hi, I am trying to find a way to assert the actual content of a PDF. I know there is such a thing as PDFBox ([Apache PDFBox | A Java PDF Library](https://pdfbox.apache.org/index.html)) , but don’t know how it fits into the Katalon eco system. Do I need to include a jar file into my katalon project? Which version fits? How do I write the custom keyword to do a simple content check? I would hope that this has already been done by someone on the community, so there is no need for me to start inventing that wheel again… What do I have …

You should be able to find a way to convert the HTML to PNG (taking screenshots), comparing PNG images using Katalon Studio yourself.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [October 14, 2022, 8:51pm UTC](https://forum.katalon.com/t/visual-testing-supports-pdf-to-pdf-comparison/79339/5 "2022-10-14T20:51:11Z")

</div>

> [@kmadhusudhananprabak](#):
>
> some options to compare base and actual PDF validation like Web

I don’t think the comparison performed by Visual Testing is not useful for you. All it does is pixel-to-pixel comparison in images. Though they claim it is AI driven, pixel-to-pixel comparison doesn’t do valuable work anyway. That wouldn’t inform you much. Visual Testing is a tool to determine if there is anything unexpected in images. It is not designed to provide you precise information how 2 subjects differer.

The best way to compare a pair of PDF files (one is a template, another is a derivative from the template) is, as far as I see, provided by Adobe Acrobat Pro (payable product, you know).

> **[Compare two versions of a PDF file (Acrobat Pro)](https://helpx.adobe.com/acrobat/using/compare-documents.html)**
>
> Follow these steps to use the Compare Documents feature of Adobe Acrobat to compare two versions of a PDF file and get a detailed report with the differences.

This would be a good tool to compare the template PDF and the stuffed PDF precisely. It will give you good information where and how they differ.

There is Acrobat SDK, with which you would possibly be able to automate driving Adobe products in Katalon Studio; you need to write a lot of custom codes — I haven’t done it, no experience, sorry, I just guess.

> **[Acrobat Pro DC command line execution](https://community.adobe.com/t5/acrobat-discussions/acrobat-pro-dc-command-line-execution/m-p/10903615)**
>
> Can we access and do the actions available in Acrobat Pro DC such as Edit PDF using command line execution? is it possible? if yes, please help me with the execution procedure.
