Naming of CEF print documents

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Naming of CEF print documents

Postby cbreemer » Tue Aug 23, 2022 1:56 pm

Hi all,
I have a C# program with a CefBrowser component called "front". I fill the component with HTML, and it shows up 100% correctly), then I do

Code: Select all
CefSharp.WebBrowserExtensions.Print(front);


The HTML is printed correctly, but I wonder about the name of the print document I see in the Windows Printers app, which is something like :

Code: Select all
data_text_html,%0D%0A_%21--%0D%0A    Pr...0A%0D%0A_%2Fbody_%0D%0A_%2Fhtml_%0D%0A


I'm at a loss how to interpret this, especially when I am printing TWO separate CefBrowsers and I can't tell these names apart. This is not normally a problem, except when the printer stalls and there are multiple jobs in the queue with indecipherable names.

Would it be possible to assign some meaningful name to the printed document ? I see that this value is equal to
Code: Select all
CefBrowser.Address
, but unfortunately this is a read-only property. Any ideas out there ?
cbreemer
Newbie
 
Posts: 7
Joined: Thu Sep 23, 2021 12:47 pm

Re: Naming of CEF print documents

Postby cbreemer » Thu Aug 25, 2022 9:15 am

I already worked this out. The document title comes from the <title> tag in the document - should have known ! Previously I did not have that and then the print job shows with either about:blank or some funky generated name. Now that I've added the tag, all is well. Thanks.
cbreemer
Newbie
 
Posts: 7
Joined: Thu Sep 23, 2021 12:47 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 57 guests