{"action":"closed","issue":{"url":"https://api.github.com/repos/dhorions/boxable/issues/88","repository_url":"https://api.github.com/repos/dhorions/boxable","labels_url":"https://api.github.com/repos/dhorions/boxable/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/dhorions/boxable/issues/88/comments","events_url":"https://api.github.com/repos/dhorions/boxable/issues/88/events","html_url":"https://github.com/dhorions/boxable/issues/88","id":195836651,"number":88,"title":"<br> tag inside <li> tag doesn't preserve current indentation ","user":{"login":"Frulenzo","id":4593056,"avatar_url":"https://avatars2.githubusercontent.com/u/4593056?v=4","gravatar_id":"","url":"https://api.github.com/users/Frulenzo","html_url":"https://github.com/Frulenzo","followers_url":"https://api.github.com/users/Frulenzo/followers","following_url":"https://api.github.com/users/Frulenzo/following{/other_user}","gists_url":"https://api.github.com/users/Frulenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/Frulenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frulenzo/subscriptions","organizations_url":"https://api.github.com/users/Frulenzo/orgs","repos_url":"https://api.github.com/users/Frulenzo/repos","events_url":"https://api.github.com/users/Frulenzo/events{/privacy}","received_events_url":"https://api.github.com/users/Frulenzo/received_events","type":"User","site_admin":false},"labels":[{"id":84798071,"url":"https://api.github.com/repos/dhorions/boxable/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-15T15:36:47Z","updated_at":"2018-03-14T13:33:06Z","closed_at":"2018-03-14T13:33:06Z","author_association":"COLLABORATOR","body":"So when we want to break sentence with <br> tag in current list item unfortenutly new line doesn't take list indentation in count.\r\n\r\nTest case (third cell is point of interest) :\r\n```java\r\n@Test\r\n\tpublic void SampleTest11() throws IOException {\r\n\r\n\t\t// Set margins\r\n\t\tfloat margin = 10;\r\n\r\n\t\t// Initialize Document\r\n\t\tPDDocument doc = new PDDocument();\r\n\t\tPDPage page = addNewPage(doc);\r\n\r\n\t\t// Initialize table\r\n\t\tfloat tableWidth = page.getMediaBox().getWidth() - (2 * margin);\r\n\t\tfloat yStartNewPage = page.getMediaBox().getHeight() - (2 * margin);\r\n\t\tboolean drawContent = true;\r\n\t\tboolean drawLines = true;\r\n\t\tfloat yStart = yStartNewPage;\r\n\t\tfloat pageBottomMargin = 70;\r\n\t\tfloat pageTopMargin = 2*margin;\r\n\t\tBaseTable table = new BaseTable(yStart, yStartNewPage, pageBottomMargin, tableWidth, margin, doc, page, drawLines,\r\n\t\t\t\tdrawContent);\r\n\r\n\t\t// set default line spacing for entire table\r\n\t\ttable.setLineSpacing(1.5f);\r\n\r\n\t\t\r\n\t\tRow<PDPage> row = table.createRow(10f);\r\n\r\n\t\tCell<PDPage> cell = row.createCell((100 / 3f),\r\n\t\t\t\t\"<ul><li>hello</li><li>hello 2</li><ul><li>nested</li><li>nested 2</li></ul></ul>\"\r\n\t\t\t\t);\r\n\t\tcell.setFontSize(6);\r\n\r\n\t\tCell<PDPage> cell2 = row.createCell((100 / 3f),\r\n\t\t\t\t\"<ul><li>hello</li><li>Have fun with it. The only thing worse than yellow snow is green snow. We'll put some happy little leaves here and there. Think about a cloud. Just float around and be there. This is probably the greatest thing to happen in my life - to be able to share this with you. You can do anything here. So don't worry about it.</li></ul>\"\r\n\t\t\t\t);\r\n\t\tcell2.setFontSize(6);\r\n\r\n\t\tCell<PDPage> cell3 = row.createCell((100 / 3f),\r\n\t\t\t\t\"<ul><li>hello</li><li>Have fun with it. The only thing worse than yellow snow is green snow. We'll put some happy little leaves here and there. Think about a cloud. Just float around and be there. This is probably the greatest thing to happen <br>in my life - to be able to share this with you. You <br>can do anything here. So don't worry about it.</li></ul>\");\r\n\t\tcell3.setFontSize(6);\r\n\t\t\r\n\t\ttable.draw();\r\n\r\n\t\t// Save the document\r\n\t\tFile file = new File(\"target/SampleTest11.pdf\");\r\n\t\tSystem.out.println(\"Sample file saved at : \" + file.getAbsolutePath());\r\n\t\tFiles.createParentDirs(file);\r\n\t\tdoc.save(file);\r\n\t\tdoc.close();\r\n\t}\r\n```\r\n[brTagInsideListElement.pdf](https://github.com/dhorions/boxable/files/655043/brTagInsideListElement.pdf)\r\n"}}
{"actor":{"display_login":"Frulenzo"}}