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

Update openhtmltopdf to 1.0.8 #438

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions flexmark-pdf-converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<properties>
<!-- Define the version of OPEN HTML TO PDF in the properties section of your POM. -->
<openhtml.version>1.0.0</openhtml.version>
<openhtml.version>1.0.8</openhtml.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -53,12 +53,6 @@
<artifactId>openhtmltopdf-rtl-support</artifactId>
<version>${openhtml.version}</version>
</dependency>
<dependency>
<!-- Optional, leave out if you do not need HTML5 parsing support. -->
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-jsoup-dom-converter</artifactId>
<version>${openhtml.version}</version>
</dependency>
<!--
<dependency>
&lt;!&ndash; Optional, leave out if you do not need logging via slf4j. &ndash;&gt;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.vladsch.flexmark.pdf.converter;

import com.openhtmltopdf.DOMBuilder;
import com.openhtmltopdf.bidi.support.ICUBidiReorderer;
import com.openhtmltopdf.bidi.support.ICUBidiSplitter;
import com.openhtmltopdf.outputdevice.helper.BaseRendererBuilder;
Expand All @@ -13,6 +12,7 @@
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.encryption.ProtectionPolicy;
import org.jsoup.Jsoup;
import org.jsoup.helper.W3CDom;
import org.w3c.dom.Document;

import java.io.FileNotFoundException;
Expand Down Expand Up @@ -138,7 +138,7 @@ private static void handleW3cDocument(String html, String url, PdfRendererBuilde
org.jsoup.nodes.Document doc;
doc = Jsoup.parse(html);

Document dom = DOMBuilder.jsoup2DOM(doc);
Document dom = new W3CDom().fromJsoup(doc);
builder.withW3cDocument(dom, url);
}

Expand Down