Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about full pages exlusions #72

Closed
jradom opened this issue May 12, 2020 · 3 comments
Closed

Question about full pages exlusions #72

jradom opened this issue May 12, 2020 · 3 comments

Comments

@jradom
Copy link

jradom commented May 12, 2020

Hello

Let's say I have 2 files which can have from 2 to X number of pages. I can 2 and 2 or 3 and 3 or 15 and 15, etc. I always want to compare only the first 2 pages and exclude all others to the end. I want to use only one conf file. Please, suggest what is the best way will be to do that? Also, can source and target files be in any separate directories? What are the changes in the last version vs 2 versions back?

Thanks a lot in advance

Jeff

@finsterwalder
Copy link
Collaborator

It does not hurt to add pages in an exclude file, that don't exist. So you could write a file that excludes the maximum amount of pages that you expect like this:
exclusions: [
{ page: 3 },
{ page: 4 },
....
{ page: 15 }
]
There is no easier way currently.

Or you could do it programmatically:
pdfCompare = new PdfComparator("expected.pdf", "actual.pdf")
for( in i = 2; i++; i < 20) {
pdfCompare.withIgnore(new PageArea(i));
}
or similar.

@jradom
Copy link
Author

jradom commented May 12, 2020 via email

@finsterwalder
Copy link
Collaborator

With the current implementation and format, that is not so trivial to do.
And it's not high on my list of things to do...
Feel free to implement something and create a merge request. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants