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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Printing to pdf pages with frames

Post Reply
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Printing to pdf pages with frames

Post by salvadordf »

Hi,

Perhaps the "Save as..." dialog is setting the focus on the TCEFWindowParent component after the user selects the PDF name.

If you are using the MiniBrowser demo try setting CEFWindowParent1.TabStop to FALSE.

If you still have problems, please provide a URL and all the details to reproduce this issue.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Printing to pdf pages with frames

Post by salvadordf »

Something similar is described in this CEF issue :
https://bitbucket.org/chromiumembedded/ ... content-is

The solution is to set the scale factor in the PDF printer settings like this :

Code: Select all

Chromium1.PDFPrintOptions.scale_factor := 50;
These are the code comments for the "scale_factor" setting in CEF :

Code: Select all

  ///
  // The percentage to scale the PDF by before printing (e.g. 50 is 50%).
  // If this value is less than or equal to zero the default value of 100
  // will be used.
  ///
Try different values. Perhaps 50 is too low but I tested it and it prints the whole document.
You don't need to set the focus in that frame with this solution.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Printing to pdf pages with frames

Post by salvadordf »

Please, if you have the fix for the CEF3 binaries create a "pull request" in the CEF3 project.

Thank you!
Post Reply