-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] remove "https://tauri.localhost/" from print using rust. #1300
Comments
can you explain more? this doesn't seem to make sense. if you're talking about the command-line output, the users can't see it at all. |
When you invoke window.print it opens the native print window which inject a script to your html and adds a header (app name) and footer (url), the user can scroll down and look for a checkbox that toggle this in the native print dialog, but its confusing for most users to see "https://tauri.local/" printed on their reports paper for no reason. |
I can't use jsPDF or any other pdf library because they don't support rtl languages fully but the browser have a good rendering engine when it comes to rtl languages. I am using electron right now and it works perfectly because electron has a feature: webcontents.printToPDF. But distributing multiple 70mb-140mb apps (Simple apps) is kinda of annoying. |
Hmm, if you can control the HTML of content, perhaps you can try using CSS: https://stackoverflow.com/questions/8228088/remove-header-and-footer-from-window-print On Windows, we simply call |
Setting the body margins instead of the page margins will add margin-top for the first page but not the rest (2,3,4,5 ...... Etc will have margin-top:0). This can't be controlled using css or JavaScript. So it essential to find away to generate pdfs directly using the webview api without the need for native print preview, this is a truly important feature for desktop apps |
This can be solved by adding printtopdf method that silently generate a pdf from the current window with developer settings. |
Any updates about this feature (pdf silent print) |
#1317 is implementing the option. Let's see what we can do there |
This will be great looking forward for this feature. |
Is your feature request related to a problem? Please describe.
How Can I hide url path while print using rust without user interaction (hiding header and footer)
Describe the solution you'd like
I need to be able to control print from my app completely because I need to print html content a lot in my apps, I am using electron, but I am trying to migrate to tauri but this feature is a real pain because users of my app will definitely complain if they see "https://tauri.localhost".
The text was updated successfully, but these errors were encountered: