-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/pdfutils layout check #405
Conversation
//reads text from a pdf given as input steam. | ||
String textFromPdf = PdfUtils.getStringFromPdf(InputStream stream); | ||
//reads text from only one page of a pdf given as input steam. | ||
String textFromPdf = PdfUtils.getStringFromPdf(InputStream stream, int pageIndex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the index, but the page number.
---- | ||
|
||
== Exporting images | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a simple example how to store an image from a single page of a PDF and add a comment how the file name is
String content = PdfUtils.getStringFromPdf(absoluteFilePath, 2); | ||
Assert.assertFalse(content.contains("This is page 1 of 2"), errorMessage); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some tests to verify pdfToImage
* @param dpi The resolution of the rendered image | ||
* @return A list of rendered image files | ||
*/ | ||
public static List<File> pdfToImage(String pdfFileLocation, int dpi) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename the method to getImageFromPdf
to be consistent with getStringFromPdf
Description
assertImage
toLayoutCheck
to provide an option to compare an image file with a reference imageType of change
Please delete options that are not relevant.
Checklist: