Could not open PDF with pdfium

Having problems with building or using the JCEF Java binding? Ask your questions here.

Could not open PDF with pdfium

Postby michael10 » Tue May 17, 2016 1:52 am

Creating Java-CEF described for VisualStudio15, with build "2016-05-11 CEF 3.2623.1399.g64e2fe1".
I can run the MainFrame tests, but when I want to test "open file" I get the save dialog and following logging:

Code: Select all
Using:
JCEF Version = 3.2623.0
CEF Version = 3.2623.1397
Chromium Version = 49.0.2623.110
..
[0517/084109:VERBOSE1:webrtc_internals.cc(58)] Could not get the download directory.
[0517/084206:VERBOSE1:navigator_impl.cc(161)] Failed Provisional Load: file:///C:/Users/michael10/Documents/ErsteHilfeBescheinigung.pdf, error_code: -3, error_description: , showing_repost_interstitial: 0, frame_id: 1
java.lang.NullPointerException
   at java.lang.String.length(String.java:623)
   at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:420)
   at java.lang.StringBuilder.append(StringBuilder.java:136)
   at tests.detailed.MainFrame$3.onLoadError(MainFrame.java:196)
   at org.cef.CefClient.onLoadError(CefClient.java:738)


I thought PDF plugin (pdfium) is integrated into libcef.dll

Version Info
CEF 3.2623.1397.gaf139d7
Chromium 49.0.2623.110
OS Windows
WebKit 537.36
JavaScript 4.9.385.33
Flash 21.0.0.213
User Agent Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Command Line "D:\builds\HEAD_CI\tools\jdk1.8.0_60\bin\javaw.exe" -djava.library.path="D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\lib\win32" -dfile.encoding=Cp1252 -classpath --ppapi-flash-path="C:\Windows\SysWOW64\Macromed\Flash\pepflashplayer32_21_0_0_213.dll" --ppapi-flash-version=21.0.0.213 --allow-outdated-plugins --disable-gpu --allow-unchecked-dangerous-downloads --browser-subprocess-path="D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\lib\win32\jcef_helper.exe" --no-sandbox --lang=en-US --log-file="D:\builds\HEAD_CI\tools\jdk1.8.0_60\bin\debug.log" --log-severity=verbose --disable-extensions "D:\EclipseWorkspace\HEAD_CI\jcef\bin;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\gluegen-rt.jar;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\gluegen-rt-natives-windows-i586.jar;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\jcef.jar;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\jcef-tests.jar;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\jogl-all.jar;D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\jogl-all-natives-windows-i586.jar" tests.simple.MainFrame
Module Path D:\depot\git-repository\java-cef\src\binary_distrib\win32\bin\lib\win32\libcef.dll
Cache Path
michael10
Newbie
 
Posts: 8
Joined: Fri May 13, 2016 2:34 am

Re: Could not open PDF with pdfium

Postby magreenblatt » Tue May 17, 2016 9:59 am

PDF support is currently disabled in JCEF on Windows due to shutdown issues (https://bitbucket.org/chromiumembedded/cef/issues/1680). You can remove the `--disable-extensions` flag from ClientApp::OnBeforeCommandLineProcessing to re-enable it: https://bitbucket.org/chromiumembedded/ ... ew-default
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Could not open PDF with pdfium

Postby michael10 » Thu May 19, 2016 1:05 am

Thanks for info, it works now.
Can you make a prediction, when the PDF support will be enabeled in the build.
Because we want to use JCEF for our customer and we are now in prototyping and need PDF and FLASH support.

Best regards
Michael
michael10
Newbie
 
Posts: 8
Joined: Fri May 13, 2016 2:34 am

Re: Could not open PDF with pdfium

Postby magreenblatt » Thu May 19, 2016 9:10 am

michael10 wrote:Can you make a prediction, when the PDF support will be enabeled in the build.

Unfortunately not. The shutdown problem is really only an issue in Debug builds -- if you're using a Release build then it should be fine.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Could not open PDF with pdfium

Postby fmilano » Sun May 28, 2017 1:27 pm

Ok, I have activated the extensions, but is it possible that the wrapper does not have the implementation for PrintToPDF?

Thanks in advance!
fmilano
Newbie
 
Posts: 2
Joined: Sun May 28, 2017 1:25 pm

Re: Could not open PDF with pdfium

Postby magreenblatt » Mon May 29, 2017 6:22 am

You can implement printToPDF in JCEF. PRs welcome.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 22 guests