I am parsing some HTML using HTMLWorker in Java and then pasting it into PDF using iText. I create a document by calling new Document(PageSize.A4, 40, 40, 40, 40); , which should indicate a margin of 40px from all sides, but when I paste the parsed HTML code that contains a table wider than the page, the right edge does not work, and the table reaches the right border of the page ... All fields are fine, except for the correct one. .. any suggestions?
corresponding code:
Document document = new Document(PageSize.A4, 40, 40, 40, 40); HashMap<String, Object> map = new HashMap<String, Object>(); map.put(HTMLWorker.FONT_PROVIDER, new MyFontFactory10()); HTMLWorker worker = new HTMLWorker(document); worker.setProviders(map); worker.parse(new StringReader(VARIABLE_CONTAINING_HTML_CODE));
source share