-
Notifications
You must be signed in to change notification settings - Fork 613
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
Parse HTML List #290
Parse HTML List #290
Conversation
Not reproducing the problem so far |
ad7db30
to
9f39e4e
Compare
In the following example, HTMLWorker.parseToList() should return a list of items, with some items containing a list of items.
The expected result is:
But the current result is:
|
2140c24
to
4c781e1
Compare
You're right. With your piece of code the nested list is correctly identified. |
Thank you for accepting my suggestion for improvement. I have no idea what the processes are to make changes to projects at Github. I would have to learn all this first. That's why I think it's better if you make those changes for me. I hope we do not find any more bugs. OpenPDF is an excellent tool. |
PdfWriter.getInstance(document, new FileOutputStream("parseHelloWorld.pdf")); | ||
// step 3: we open the document | ||
document.open(); | ||
// step 2: |
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.
Step 1: "description"
Step 3: "description"
Step 2: "no description"
...
(⊙_☉)
public static void main(String[] args) { | ||
System.out.println("Parse Nested HTML List"); | ||
try { | ||
final String htmlText = |
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.
What's the difference between test above and this one?
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.
This one uses HTMLWorker#parseToList()
with a StringReader and produce a list on items.
The previous one uses HtmlParser#parse()
with a Document to produce a PDF.
The first one produced a good PDF document with the nested HTML List. But the problem of this issue is really about the HTMLWorker#parseToList()
not producing the nested List as expected.
Event if the first test, producing the PDF, is not showing the bug, I choose to keep it as a Non-Regression Test.
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.
But why second example contains HTML markup as a String and not as a file?
README.md
Outdated
@@ -101,9 +101,9 @@ Significant [Contributors to OpenPDF](https://github.com/LibrePDF/OpenPDF/graphs | |||
[@lapo-luchini](https://github.com/lapo-luchini) | |||
[@jeffrey-easyesi](https://github.com/jeffrey-easyesi) | |||
[@V-F](https://github.com/V-F) | |||
[@sixdouglas](https://github.com/sixdouglas) - Douglas Six | |||
[@sixdouglas](https://github.com/sixdouglas) - Douglas Six |
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.
Spaces?
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.
The spaces here are meant to be displayed as new line in the Markdown file. There are some at the end of every other lines for this purpose.
4c781e1
to
93f9417
Compare
I checked it with 1.3.13-SNAPSHOT and it works fine. Nested lists are displayed as expected.
… Von: Andreas Rosdal ***@***.***>
Is this ready now?
|
Fixing the #288
Trying to reproduce the bug