I print on PDF by using control of ChromiumWebBrowser But my PDF page doesn't fit into A4 page
That's mean it doesn't fit into a page.It brims over a page.I just want in one page.
Is it possible for me to do this?
Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation. Hi ArzuYıldız1,
I'm Paul, a fellow customer like you & an Independent Advisor. You can use the "Shrink to page" scale, as shown below screenshot.
I hope this helps. Let me know how you go. Thank you!
Sincerely,
Paul A.
Independent Advisor
Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.
First of all thank you very much for your help. The solution you suggest does not solve my problem. I get an html file from another application. When I convert this html file to pdf, the width of the html page is big for the A4 page width, so it doesn't fit on the A4 page while saving it as pdf.
I think that when I create a pdf file, I need to handle the fitting to this page. But how? :)

The right side of the page is overflowing as in the image imgur.com/a/yPzOD0s I want to do imgur.com/a/xLx6ByQ

I tried to solve my problem by giving margin settings to the asecron method of ChromiumWebBrowser control to convert pdf, but I was not successful. The code below is the code snippet that I converted to pdf.

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation. Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.
Got it now, thanks. So, what's the name of the PDF printer you're using?
May I have the screenshot of the Printer settings page right before you print it to PDF? Thanks.
Also, try opening those HTML files using another browser (at least 2 browsers - Google Chrome & Firefox) & see if the issue persists. Just right-click on the HTML file > choose the "Open With..." option.
I hope this helps. Let me know how you go. Thank you!
Sincerely,
Paul A.
Independent Advisor Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.

Hi Paul,

The part that I converted to html pdf with the asecron method of the CefSharp library is problematic.
I don't get an error when I view the html file in different browsers.

Even when I print, the html document is printed properly on the page with shrink to fit.
But there is a problem when I say convert and print pdf from html.

Just before printing to PDF, I added my Printer settings and other related images.

Thank you again for your help.

1- Chrome Browser

2- FireFox

3-Printer Name , Settings

Error-free when printing an html document

Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation. Hi ArzuYıldız1,
Got it, thanks. Now, if that's the case, then the issue is most likely isolated to CefSharp only. CefSharp is an open-source version of Google Chrome. However, before we conclude further, I suggest trying these steps below first.
1. Temporarily enable your built-in Admin User & login as that user. Then test if the issue persists.
https://answers.microsoft.com/en-us/windows/for...
2. If the issue persists, then I suggest either liaise with CefSharp's community support found at https://cefsharp.github.io/ or post a message at https://social.technet.microsoft.com/Forums/en-... to ask help from developers/engineers who have been working with CefSharp.
I hope this helps. Let me know how you go. Thank you!
Sincerely,
Paul A.
Independent Advisor Harassment is any behavior intended to disturb or upset a person or group of people. Threats include any threat of suicide, violence, or harm to another. Any content of an adult theme or inappropriate to a community web site. Any image, link, or discussion of nudity. Any behavior that is insulting, rude, vulgar, desecrating, or showing disrespect. Any behavior that appears to violate End user license agreements, including providing product keys or links to pirated software. Unsolicited bulk mail or bulk advertising. Any link to or advocacy of virus, spyware, malware, or phishing sites. Any other inappropriate content or behavior as defined by the Terms of Use or Code of Conduct. Any image, link, or discussion related to child pornography, child nudity, or other child abuse or exploitation.