Print documents without footer information

When I create documents, I like to have the full path and file name printed on the bottom. I need to send these documents to a number of users and would like to hide that information. If I turn the footer off, the information is lost and has to be added back. I can save a copy of the document without the footer, but that doesn’t work well if changes need to be made.

Is there some way to hide this information when printing?

I am on Windows 10, using LO 7.2.7.2 (x64).

Any help is appreciated. Thanks in advance, Linda

Menu Format / Page Style… / Footer tab. Check / unCheck “Footer on”.

Make the footer text invisible. Modify the Footer paragraph style, select the Font effects tab, tick Hidden to hide the text. You can also set the color to white.

1 Like

Don’t works for Calc, and in Writer be sure to left at least one space not hidden so the Footer don’t collapse.


There is a bug in Calc (7.2.7.2): I set the Footer font color to white, added a character after the page number field, and when set its font color to red, the page number was shown in red. If there is a space between the field and the character the bug is not shown.
Later will search for a bug, or report it.

EDIT: tdf#151042.

2 Likes

@LeroyG: didn’t know that. If so, the best thing to do would be to save the file before printing, then hide the footer, then print, then close without saving.

1 Like

@LindaPro: in Writer, how do you get the “full path and filename”? Do you insert it with a field?
If you’re familiar with fields, you can make this insertion “conditional”. All you need is to defined a variable which will control the visibility of your sensitive information. Define the variable in a dedicated first paragraph in the document. Assign Hidden attribute to the style for this paragraph.
In the footer, put sensitive data in its own paragraph so that you can attach to it a Hidden Paragraph field depending on the variable.
Now, before you print or export to PDF, set the variable according to your privacy preference.

1 Like

===Editing===
My second answer below may be acceptable for you as a solution.
===End Edit===
I already sketched an answer yesterday, but then put it aside because I couldn’t get a concise post distinguishing all the cases left open by the question. Brevity aside now.

  1. Spreadsheet headers and footers are an ugly and conceptually outdated thing. You can’t even adjust the margins or the column widths. That’s not silly, but just old style. There were times when nobody using spreadsheets worried about such things. Sheets were supposed to be “technical”. Do you insist to use a footer for what you want to achieve nonetheless?
  2. The only information you actually need HeaderFooter functionality for is the PageNumber/PageCount thing for which still special TextField objects are used only working there and being updated only for printing or previewing. Even the view controller doesn’t “know” them, and the funny 'Page Break" view provides no naccess for user code. (In addition it is buggy if skew print ranges are set. That’s very different from Writer standards.)
  3. Concerning sheet names, paths, datetime, you can use well positioned cells. Such cells can easily be excluded from printing without changing the well considered print ranges, and without losing their contents.
  4. Whether specific cells are printed or not will not change the page wrapping. Switching HeaderFooter Off/On will! (…if not all the brakes are inserted manually)
  5. Concerning the filepath it’s unclear to me what’s the purpose: Do you dislike to unveil parts of the tree your local filesystem is using? Is this related only to prints you are producing on your system, and this way concerning readers, or is it relevant only concerning users who get the file itself for their own printing and usage? In the second case: Don’t worry. The path they print will be as found on their systems.
  6. Concerning the full path: If it’s not about the prints, you find it in the Standard toolbar if enabled. It is not resizable, however, and I personally prefer a way based on user code to show it in the title bar of the document’s frame. (I also display there additional information.) This requires some tampering with document events.
  7. Finally a few lines of user code providing a Calc function to display the documents filepath:
Function fullDocumentFilePath(Optional pDoc As Object) As String
If IsMissing(pDoc) Then pDoc = ThisComponent
On Local Error Goto fail
h = ConvertFromURL(pDoc.URL)
If h="" Then
 fullDocumentFilePath = "not:yet:stored"
Else
 fullDocumentFilePath = h
EndIf
fail:
End Function

The shorter answer now:
I also thought switching off header or footer would clear the content.
Experimental research showed that this is only true for the UI path of handling page styles.
Under the cover there are the needed Boolean properties .HeaderOn and .FooterOn of any PageStyle, and we can easily manipulate them by user code. The unchanged content of HeaderFooter for which printing is set OFF is nonetheless stored to the file next time, and can later be set ON for printing again.
The example comes with a floating toolbar for switching OFF HeaderFooter printing by an ordinary Click, and swithing it on again by a Shift+Click.
Of course, it’s not difficult to enhance the code in different directions.
sheetHeaderFooterExperiments.ods (38.3 KB)
The freebie goody: You can even change th HederFooterOffOn mode during print preview…

2 Likes

I appreciate the time you have spent working on this. Unfortunately, I am not well versed in the technical side of LO. The solution you have given is way over my head.

Sorry, I couldn’t find a way to suppress (recoverable) the printing of headers and footers via the UI. Moreover I think there currently is none, and any solution meeting your needs will require user code.

@Lupp, in my version 7.4.1.2 Win10 enabling/disabling Headers and Footers seems to work through the UI.
Attached an example of your file with Headers and Footers off. After opening the file, I can enable them (“On”) through the UI.
sheetHeaderFooterExperiments.ods (20.4 KB)

@ sokol92
My 7.3.2 behaved as I know it for a long time: Header of Footer once disabled you found them empty after enabling again. Just tested again to be sure.
If 7.4.y keeps the content, thats progreess, and @LindaPro will be happy. I will test soon (think withinh a week) with 7.4.

That it is true for Writer, but not for Calc.

Why? All they see is the path/name of their copy.

Most of the users don’t know what it is and when I try to explain, it goes over their heads! TMI for the users.

So much for the 21st century. What a shame.