[Dropped] Keep text visible, but set it to NOT print

Discuss the word processor
Locked
PavPev
Posts: 8
Joined: Wed Oct 21, 2015 11:49 am

[Dropped] Keep text visible, but set it to NOT print

Post by PavPev »

Hey all,

I have spent a few days searching for a solution to this issue... I am creating a document for others, less technically proficient in our office to use; We have numbered sections which we have to work through and fill in as we go. We also want to exclude sections we don't need all together. Ideally, I'd like to be able to keep them visible in Writer (perhaps highlighted or in a different font colour) but have them NOT print when we print to PDF or to our printers.

I have explored using the 'Hidden' Font Effect within the Paragraph Styles, this does the job but removes it all together. I can be turned on and off easily enough,but it overrides the Heading Styles etc. making it a pain to reinstate at a later date if needed.

I'm sure there must be a way to select a load of text, somehow set it up with some parameter or style which highlights it to show the user it has been applied, and then does NOT print that section, just pushing all the text up as if it isn't there at all.

Am I asking too much? Any help would be appreciated!

Pav
Last edited by MrProgrammer on Sat Jan 11, 2025 4:52 pm, edited 1 time in total.
Reason: Dropped: No attachment from PavPev to demonstrate the situation
OpenOffice 3.0.1
Windows 7 Pro x64
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Keep text visible, but set it to NOT print

Post by Villeroy »

Text frames can be visible but unprintable.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
PavPev
Posts: 8
Joined: Wed Oct 21, 2015 11:49 am

Re: Keep text visible, but set it to NOT print

Post by PavPev »

Thanks Villeroy, just had a play around with those. You're quite right, they are visible in Writer, and don't print, but they leave a big white space too. These may ultimately get used many times throughout the finished document and I'd rather not have pages with lots of empty space - is there a way to get the text to adjust up and fill the voids?

Pav
OpenOffice 3.0.1
Windows 7 Pro x64
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Keep text visible, but set it to NOT print

Post by acknak »

Set the frame to Wrap: Through.
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9604
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Keep text visible, but set it to NOT print

Post by John_Ha »

You might be able to do something by automatically running a macro which hides the text you want hidden when printing is selected. Have a look at Tools > Customise > Events ..., where one of the events which triggers a selected macro is Print Document. It may not work for Export as PDF, or clicking the PDF icon, but you could install a virtual printer (like PrimoPDF) to create PDFs via the print route, and remove Export as PDF from the menu, and the PDF icon from the Toolbar by Tools > Customise ... You can save the event link in OpenOffice, to be globally available; or in the current document, just for that document.

See below where I run a macro called Zoom_optimal each time a document is opened - it automatically sets View > Zoom ... to optimal (for all but File > New > Text document - I need to debug that).
 Edit: Fixed by running the macro for the New Document event as well as for the Open Document event. 
You could probably also do something with Master Document where you pull in, or don't pull in, the wanted/unwanted text.

Or have the text as linked graphic images, and replace graphics by a 1 x 1 pixel graphic if you don't want white space. Or replace the linked graphics by blank graphics. Or, if you have no other graphics, don't print images.

That being said, trying to cobble something together is always likely to fail at some stage unless you write some (probably complex) code to do precisely what you want which takes account of how users may inadvertently? deliberately? circumvent it. Andrew Pitonyak's Useful Macro Information For OpenOffice is an invaluable resource - and you may get more help in the Macros and UNI API forum here.

Setting text to white is useful - it does not print on white paper. Can you do something with the Automatic font colour, which displays (not prints??) text as white on dark backgrounds, and black on light backgrounds.

If this solves the problem, please click the Edit button on your original post and edit the Title to [Solved].
Attachments
Clipboard02.png
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Keep text visible, but set it to NOT print

Post by Villeroy »

PavPev wrote:Thanks Villeroy, just had a play around with those. You're quite right, they are visible in Writer, and don't print, but they leave a big white space too. These may ultimately get used many times throughout the finished document and I'd rather not have pages with lots of empty space - is there a way to get the text to adjust up and fill the voids?

Pav
Do you know all the placeholder fields under menu:Insert>Fields?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
PavPev
Posts: 8
Joined: Wed Oct 21, 2015 11:49 am

Re: Keep text visible, but set it to NOT print

Post by PavPev »

acknak wrote:Set the frame to Wrap: Through.
Thanks for the suggestion acknak, but the problem there is that we want the flexibility to print some and not others, to turn them on and off as required. This method means the ones left on will overlap other text and require adjusting space on the page manually (that's the kind of thing we're looking to avoid).
Villeroy wrote:Do you know all the placeholder fields under menu:Insert>Fields?
I'm not too familiar with the Placeholder Fields, or Fields in general tbh! I managed to create a variable that could hide a whole section, but this also left a big blank space.
John_Ha wrote:You might be able to do something by automatically running a macro which hides the text you want hidden when printing is selected. Have a look at Tools > Customise > Events ..., where one of the events which triggers a selected macro is Print Document.
I will look into this. It needs to be friendly to less technical users than I so everyone in our office can use it correctly.
John_Ha wrote:It may not work for Export as PDF, or clicking the PDF icon, but you could install a virtual printer (like PrimoPDF) to create PDFs via the print route, and remove Export as PDF from the menu, and the PDF icon from the Toolbar by Tools > Customise ...
That's fine, we already use CutePDF to print to PDF anyway.
John_Ha wrote:Or have the text as linked graphic images, and replace graphics by a 1 x 1 pixel graphic if you don't want white space. Or replace the linked graphics by blank graphics. Or, if you have no other graphics, don't print images.
The text needs to be editable in writer, and from what I've seen of linked images in this version of Writer, the quality is not great.
John_Ha wrote:That being said, trying to cobble something together is always likely to fail at some stage unless you write some (probably complex) code to do precisely what you want which takes account of how users may inadvertently? deliberately? circumvent it.
Our staff can be trained to a point, it still needs to be easy to do. The ideal solution would be for a drop-down box/tick box next to each paragraph, giving the option to print or not, and if not, then the text is highlighted to show it is being excluded (in writer) and the rest shuffles up (when printing) as if it's not there. I'm sure someone must have created something to do this job before?
John_Ha wrote:Setting text to white is useful - it does not print on white paper. Can you do something with the Automatic font colour, which displays (not prints??) text as white on dark backgrounds, and black on light backgrounds.
Would still leave blocks of empty space, and if someone copy/pastes out of our document at a later stage it would pick up text which is not relevant to our document

Thank you for all the suggestions though! I'm going to look into the macros/events and see if there's something I can make work there.

If anyone has any further solutions, please throw them out there!

Pav
OpenOffice 3.0.1
Windows 7 Pro x64
John_Ha
Volunteer
Posts: 9604
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Keep text visible, but set it to NOT print

Post by John_Ha »

Also have a look at the Paid Support forum on this list of help resources for AOO - you may be able to commission someone to write something for you.

And another thought - put each chunk of text you do not want to print in a single cell of a spreadsheet, and link the spreadsheet cells to the document so the text appears. All you now have to do is switch between the proper spreadsheet for viewing, and an alternative spreadsheet, with empty cells, for printing. A macro could do this where the alternative spreadsheet could have spaces at 1 point which will come in as very small.

If you could put your text as an appendix, at the end of the document, you could not print the final pages. A macro could count the pages until it gets to the appendix, and print only the correct pages.

That being said, I still like the idea of a master document, which contains all the wanted text; and sub-documents, which contain the unwanted text. You then merely use the macro to replace the files in the folder containing unwanted text with identically named, but empty, files for printing. See Chapter 13 - Working with Master Documents in the Writer Manual.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9604
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Keep text visible, but set it to NOT print

Post by John_Ha »

And another thought has just been suggested to me. How about inserting the optional data from a modified bibliography, where the expanded citation style is the required text paragraph? An event driven macro could then turn on the citations when the document is opened, and turn off the citations for printing.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
Posts: 9604
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Keep text visible, but set it to NOT print

Post by John_Ha »

I really should follow my oft given advice of RTM - Read The Manual - or in this case, the Help.
Creating Non-printing Text

To create text that is not to be printed do the following:

1. Choose Insert – Frame and click OK.
2. Enter text in the frame and if you want, resize the frame.
3. Choose Format - Frame/Object, and then click the Options tab.
4. In the Properties area, unmark the Print check box.
5. Click OK.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Keep text visible, but set it to NOT print

Post by RoryOF »

I think this problem can be solved by use of a document or content management system; such systems are used in organisations for preparation of standard documents from "boilerplate" text, such as assembly of contracts from a selection of standard clauses with the selection customised to suit the needs of the case. There are freeware and commercial applications to do this. Some years ago I looked briefly into this field but did not proceed in depth as the requirement did not materialise. One name that sticks in my mind is "Alfresco".

Rather than reinvent the wheel, perhaps PavPev should look into such applications. Search for "document management" or "content management".
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
PavPev
Posts: 8
Joined: Wed Oct 21, 2015 11:49 am

Re: Keep text visible, but set it to NOT print

Post by PavPev »

RoryOF wrote:Rather than reinvent the wheel, perhaps PavPev should look into such applications. Search for "document management" or "content management".
Absolutely agree with you Rory. Unfortunately our boss isn't prepared to spend company money wisely on purpose-built software and would rather have me fudge a solution as best I can :P So I'll try and get as close as possible for now!
OpenOffice 3.0.1
Windows 7 Pro x64
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Keep text visible, but set it to NOT print

Post by RoryOF »

There are freeware applications - I cannot offhand remember names but I remember that there were some.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
mgroenescheij
Volunteer
Posts: 300
Joined: Thu Apr 23, 2009 10:19 pm
Location: Sydney Australia

Re: Keep text visible, but set it to NOT print

Post by mgroenescheij »

it overrides the Heading Styles etc
Check your hidden text style in the Styles and Formatting window and display it Hierarchical to see if the Heading Styles inherit values from your hidden style.
AOO 4.1.5 on MS Windows 10 Professional & MacOS High Sierra 10.13.5
Please add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Keep text visible, but set it to NOT print

Post by RoryOF »

I recollect (recently) that a hidden paragraph/section was still counted in the numbering process, so hiding it gave a gap in the numbering.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Keep text visible, but set it to NOT print

Post by acknak »

This is like swatting at gnats because we don't know exactly what you need.

Can you make a simple document that shows what you need to do and attach that here?
AOO4/LO5 • Linux • Fedora 23
John_Ha
Volunteer
Posts: 9604
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Keep text visible, but set it to NOT print

Post by John_Ha »

And another idea - have a look at mrt.odt on Re: What's happened to my numbering?! - he has added text as comments to the document, which do not take up space in the document itself. You can prevent comments printing by Tools > Options > Writer > Print ...

There seem to be many alternatives from which to choose ...

If this solves the problem, please click the Edit button on your original post and edit the Title to [Solved].
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
TonyH
Posts: 2
Joined: Sun Jan 15, 2023 3:43 pm

Re: Keep text visible, but set it to NOT print

Post by TonyH »

Many Thanks John ha for this reply below (22/10/2015) it works!
One thing to add is that to access the 'format frame/object' option for the frame one has to click exactly on the BORDER of the frame then the frame/object option under format appears- otherwise not- eg clicking INSIDE the frame doesn't reveal it.

"I really should follow my oft given advice of RTM - Read The Manual - or in this case, the Help.

Creating Non-printing Text

To create text that is not to be printed do the following:

1. Choose Insert – Frame and click OK.
2. Enter text in the frame and if you want, resize the frame.
3. Choose Format - Frame/Object, and then click the Options tab.
4. In the Properties area, unmark the Print check box.
5. Click OK."
Open Office 4.1.13 on Windows 10
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Keep text visible, but set it to NOT print

Post by JeJe »

Alternatively you could change the font color to white before printing and back after - easy if the paragraphs are all in the same paragraph style, you just need to change the style, and perhaps automate this with a recorded macro.

Edit: oops, I see that's already suggested.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Keep text visible, but set it to NOT print

Post by JeJe »

Another approach is in the attached document, macros will have to been enabled for the document to see it working.

A macro hides "Note" paragraph style paragraphs by changing to "Note Hidden" style which is based on "Note" but has char hidden set. 'spacing above' is added to the paragraph below each Note paragraph to keep the same spacing and residual format as before.
Attachments
test.odt
(13.5 KiB) Downloaded 66 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Locked