How to print a webpage with window.print [duplicate] - javascript-events

This question already has answers here:
Removing page title and date when printing web page (with CSS?)
(10 answers)
Closed 8 years ago.
I need to remove the footer and header from a webpage and show only the content.
I did this, but in the page, URL and date are displayed, how to remove them?
<input type="button" onClick="window.print()" value="Print"/>
And window.print() function generates a file with the extension .xps. There is a way to without generate this file, just open a window and do print.

Create an hidden iFrame, insert the content what you need and then call print() on the frame. Otherwise you can use an jQuery plugin.
XPS file? Install/select your printer!

Related

How do I increase the spacing in a sphinx-rendered rst? [duplicate]

This question already has answers here:
How to add custom css file to Sphinx?
(4 answers)
Closed 1 year ago.
I have a very tight spacing between methods in sphinx. Is there a way for me to increase the spacing between them?
Original code:
.. method:: stop()
:abstractmethod:
Stop the service. Blocking.
.. method:: is_alive()
:abstractmethod:
Check if the service is currently running.
:rtype: bool
.. method:: __enter__()
Rendered HTML:
Doing so is impossible without changing a theme or adding custom CSS.
For more info, see How to add custom css file to Sphinx?

Q: TYPO3 - RTE doesn't contain 'insert image' button [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
Hello stackoverflow friends,
i have a problem, i'm new to typo3 and want to create some text with image. i try it for some time now but i dont get it. I don't have an insert image button in my text editor. installed several extensions, CKEditor and stuff.
Here is an image of my symbols:
We tried "text & media" and "text and pictures". There is just no button for inserting an image.
Yours sincerely or so
"Text and Images" and "Text and Media" content elements don't add images to the CKEditor text; you add them with the "Images" tab and they are not "embedded" in the text written with CKEditor. They are written in the HTML wrapped with the markup necessary to create a grid of images with multiple rows/columns.
In the "Gallery Settings" box inside the same tab you can decide the position of the images with respect to the text.
If you want to add support for the images inside the CKEditor, you have to install the extension https://extensions.typo3.org/extension/rte_ckeditor_image/
You can find here some articles about how to customize the configuration of CKEditor on TYPO3:
https://typo3worx.eu/2017/02/configure-ckeditor-in-typo3/
https://usetypo3.com/ckeditor.html

LibreOffice: Text for footer of last page [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I want to create a custom LibreOffice Writer template of our company. This template should include a disclamer in the footer of the last page of each document.
In our existing M$ Word template we use a field with "IF({current page}={last page};...", but LibreOffice seems not to be able to use the current page number in conditional texts.
The LibreOffice Help page says:
You cannot use internal variables, such as page and chapter numbers, in condition expression.
Using a custom page style for the last page also seems not to be a good decision, because if someone inserts too much content into that "last page" and causes an automatic page break then he gets the disclamer twice.
How can I create a footer in LibreOffice that will automatically be shown on the last page of a document, but not on any other page?
edit: I managed to write a macro that can insert a page break for the last page. Still not the complete solution, but might be a way to go:
Sub PageBreakForLastPage
' create cursor
Cursor = ThisComponent.CurrentController.getViewCursor
' move to start of last page
Cursor.jumpToLastPage
Cursor.jumpToStartOfPage
' create page break
Cursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
Cursor.PageDescName = "First Page"
End Sub
We had the same issue using the OpenOffice template engine (i suppose it's the same :D) and the only way to solve this problem was to add a footer with a custom field for the page number and fill this after each page is created.

Like Button: Make Facebook NOT take specific images [duplicate]

This question already has answers here:
Closed 11 years ago.
I'd still like my users to have a choice of image to select when sharing links from my site but I would like to restrict certain images from showing in the Facebook sharer. I don't want to select a specific image using meta tags (this has been suggested often).
Would appreciate any help!
EDIT (9 Jul 2012): This question is not an exact duplicate to any others on stack overflow. I asked for a method to restrict images from showing without specifying OG or meta tags, unlike others who have simply asked how to show a specific image. Why do people on this site assume (and rate my question down) before even reading it carefully and considering whether it is a duplicate.
The only way to do this is to specify multiple og:image tags of images that you want to allow and then the user will be able to choose from the images you select.

Can Greasemonkey cause the displayed title to change [duplicate]

This question already has answers here:
How to dynamically change a web page's title?
(20 answers)
Closed 3 years ago.
I want to change the title showing in a page based on information I pick up from within the page (eg to show the number of inbox messages)
document.getElementsByTagName('title')[0].innerHTML="foo"; does change the title tag, but firefox does not update the displayed title (in window and tags) when this happens.
Is this possible?
Try using this instead:
document.title = "MyTitle";
Try setting document.title to the new value

Resources