Our customer reported a new printing issue. We have the following usecase:
Our application uses Chromium to view PDF documents in separate Frames.
So we have a Frame displaying all available documents for a user. If the user selects to view a document and this document is a PDF, a new Window is opened, Chromium is initialized and the PDF is shown.
If the user then wants to print the PDF (via PDFium print button) and immediately closes the window before the printer started printing (and therefore terminates JCEF), the PDF is either not printed at all or the document is printed incomplete.
Sometimes also the printed pages contain error messages like the following:
PCL XL Error
Sub Sytem I/O
Error Input ReaderError
Operator BezierPatch
Position 27323
If the user waits until the printer started printing everything works fine.
So:
Is there a problem in the multi process model? Is one of the processes destroyed while creating the spool/emf file?
Shouldn't the process termination wait until the document spooling is completed?
Same with the window? Shouldn't it be that the window can't be closed until this happened?
Is there a possibility in JCEF/CEF to register a listener or publish an event that spooling finished?
We use JCEF version 3.2704, 32 bit on 64 bit Windows machines.
Logfile with verbose logging attached (Some Loggings are added by us to mark fixes for problems we had, see "MPA_LINZ_Chromium_Patch" and "MPA_CHROMIUM_PATCH" loggings).
// EDIT:
Problem with PDF not printed at all could be reproduced with newest JCEF version.
Logging of the new version (logging is the same, even if printing works or not):
D:\Git\java-cef-newest\src\tools>run.bat win32 Release detailed --log-severity=verbose --log-file=d:\temp\jcef.log
Offscreen rendering disabled
Using:
JCEF Version = 3.3112.168
CEF Version = 3.3112.1658
Chromium Version = 60.0.3112.113
CefApp: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path .\jcef_build\native\Release
Added scheme search://
Added scheme client://
CefApp: INITIALIZED
[1116/161729.684:ERROR:service_manager.cc(142)] Connection InterfaceProviderSpec prevented service: content_plugin from binding interface: memory_instrumentation::mojom::Coordinator exposed by: content_browser
CefApp: SHUTTING_DOWN
shutdown on Thread[AWT-EventQueue-0,6,main]
CefApp: TERMINATED