When I load a PDF file, I could use PrintToPdf to save this PDF file to a folder. This worked fine until CEF 84, but no longer works in CEF 85. The saved PDF files no longer have the correct content.
Is this no longer possible in Chromium 85? Or do I just miss a flag or parameter to get this working again?
Tested with CEF 85.3.10
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
CEF 85: PrintToPdf no longer works for PDF files
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEF 85: PrintToPdf no longer works for PDF files
Apparently you're being affcted by this CEF issue :
https://bitbucket.org/chromiumembedded/ ... site-which
Try using the DevTools methods as the last comment says :
https://chromedevtools.github.io/devtoo ... printToPDF
The DOMVisitor and other demos have code examples about using similar DevTools methods. For example, this procedure executes the DOM.setAttributeValue method :
https://github.com/salvadordf/CEF4Delph ... r.pas#L913
https://chromedevtools.github.io/devtoo ... ibuteValue
https://bitbucket.org/chromiumembedded/ ... site-which
Try using the DevTools methods as the last comment says :
https://chromedevtools.github.io/devtoo ... printToPDF
The DOMVisitor and other demos have code examples about using similar DevTools methods. For example, this procedure executes the DOM.setAttributeValue method :
https://github.com/salvadordf/CEF4Delph ... r.pas#L913
https://chromedevtools.github.io/devtoo ... ibuteValue
Re: CEF 85: PrintToPdf no longer works for PDF files
Hmm, I don't think that I'm affected by this CEF issue.Apparently you're being affcted by this CEF issue :
https://bitbucket.org/chromiumembedded/ ... site-which
Please try to load http://www.orimi.com/pdf-test.pdf in BriskBard 2.1, then call "Print to PDF". The generated PDF will not show the content.
Then try it again in BriskBard 2.0 and it should work correctly.
This started with CEF85, previous versions were OK.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEF 85: PrintToPdf no longer works for PDF files
I tested this with the official CEF sample application and it also generates an empty PDF.
I'll add an issue in the CEF project. Meanwhile, keep using CEF 84 if you need that feature.
I'll add an issue in the CEF project. Meanwhile, keep using CEF 84 if you need that feature.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEF 85: PrintToPdf no longer works for PDF files
I added my findings to that CEF issue because the previous cefclient version (84) showed a print dialog when you tried to use the printtopdf function but now it creates an empty document. It seems to be the same issue but not completely fixed.
https://bitbucket.org/chromiumembedded/ ... site-which
If the CEF project maintainer thinks that it's a different issue he will ask me to create a new CEF issue at bitbucket.
https://bitbucket.org/chromiumembedded/ ... site-which
If the CEF project maintainer thinks that it's a different issue he will ask me to create a new CEF issue at bitbucket.
-
- Posts: 25
- Joined: Thu Sep 21, 2017 4:33 pm
Re: CEF 85: PrintToPdf no longer works for PDF files
Hello, this problem still persists, correct?
I'm testing version 85 and the PDF appears blank, but if I click on the pdf the file is printed with the content correctly.
I'm testing version 85 and the PDF appears blank, but if I click on the pdf the file is printed with the content correctly.
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: CEF 85: PrintToPdf no longer works for PDF files
I'm afraid that the issue is not fixed in CEF 86.
The workaround works and you can print the PDF contents if you click on the document before printing.

The workaround works and you can print the PDF contents if you click on the document before printing.