Office Libre Draw pdf protection not working?

I havw followed the instructions for password protecting a pdf from copying, editing and printing, using the export as pdf system, but the result doesn’t do any of the supposed protections functions.

I have tried this protection regime on two different windows computers, both running Win 11.

Any help would be appreciated.

Please describe what specifically you see, and in which PDF reader? Like, “selecting a text in the PDF using Acrobat Reader, and pressing Ctrl+C, puts the text to clipboard, so it can be pasted to other apps”.

Hello Mike,

Sorry for the delay in responding.

I was opening a pdf created out of Word, complete with hyperlinks, and specifically opening it in Office Libre (OL) Draw.

Using “export as pdf” in the File menu, I set password protect to inhibit copy, edit and print, and then exporting the file under a new name.

If I open up the file again using OL Draw, I can copy, edit and print the file. So OL Draw must know it’s me, although there is no metadata attached to the file as far as I can see.

If I now open up the protected pdf file using Acrobat Reader, I can’t edit, copy or print, as desired. I can however highlight some text and right click to do a web lookup of that text, which is good.

If however I open the protected pdf in Slim Pdf, I can’t edit or copy, there is no web lookup function, but I CAN print. Weird.

Trying this as well in Waterfox (Firefox), I can’t edit, but I CAN copy and do web lookup. I can’t print, but I can do a screenshot. Again, weird.

Finally, if I try this process again in Chrome, I can’t edit, copy or print, but I can do web lookup, so it’s the same as Adobe Acrobat. BAsically, the hyperlinks look dead, but if you highlight one and do a web lookup, it takes you to the hyperlinked website.


I investigated using EPub to protect documents, but I found that only Cisdem PDF Convertor OCR converts a pdf to EPub and keeps the embedded hyperlinks operational, which is important to me.

As for eReaders of EPub docs, only Calibre renders the EPub generated by Cisdem’s product, keeping the pdf’s formatting and hyperlinks intact. You might think that this is the best solution to protect intellectual property, but Calibre’s eReader allows you to right click on a bare part of the displayed EPub doc and print it to pdf.

If I open a Cisdem generatedEPub doc in any eReader other than Calibre, all I get is text. No hyperlinks, no right click to look something up on the web.


So apparently there is really no way to completely protect intellectual property from alteration (editing), copying and printing, while retaining embedded hyperlinks.

Best either to go with just the pdf with hyperlinks and no protection, or to go with Cisdem’s generated EPub (from the pdf), and tell viewers to use Calibre. With the Calibre eReader open, you can share your screen 50-50, with the EPub file displayed on the left, and a browser (like Waterfox) on the right.

Thank you for guiding me in the right direction.

The only complete protection is keeping your property secret.
.
You tell about at I coffee-shop - my mobile can record and there is speech to text software available.
.
You print an old-fashioned book and we can scan it for re-print (ask older students if they remember “books” created in copy-shops) or use OCR to get the text.
.
For pdf/epub etc. you have to trust the software not giving options to copy, but anybody with a bit more knowledge can rip all shown data. Years ago there eas also a discussion, if a free open-source pdf-reader should hide this options or just offer copy, as it can easily changed by learned people.
.
Draw shows a special case: If one accepts a pdf as a bunch of little graphics, you have a form of accessing your document, and of course we can change it there. I could also use sreen-recorders to get the information one level deeper.
.
The only point, where you can interfere is alteration without being recognizable. For this you need a cryptographic signature. One can still alter the document, but signature will show: This is not what you signed. (If people don’t check the signature, fraud is also possible there. I could create a new signature by invented bobisbob, and who would check…)

I’m actually tempted to claim, that password security to protect from PDF modification is totally broken in LibreOffice 7.3.

I’m using…

Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: de-DE (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.5

… on Linux Mint Mate 21.2 with kernel 6.5.0-44-generic and can 100% reproduce a behaviour where opening an existing PDF with LibreOffice Draw and then setting up modification protection according to PDF Export Security actually does not protect from anything.

  1. Open LibreOffice Draw and begin with creating a text box containing “Hello World”.
  2. Place a rectangle filled with black over this text box as it typically happens when trying to mask confidential stuff in scanned documents.
  3. Then use the File/Export/blah.pdf option, leave all tabs untouched but set a permission pasword in the security tab.
  4. Check the (o) Changes > Not permitted radio button and export the file.
  5. Close Libre Office Draw.
  6. Reopen blah.pdf with Libre Office Draw.
  7. Dismiss the “Enter Password” prompt with [CANCEL].
  8. The file blah.pdf will open, allowing to move or even delete the black rectangle placed over the “Hello World” text box.
  9. Alternatively use InkScape to open blah.pdf. Does not even ask for a password.

Verdict: Completely useless. Stay away from LibreOffice password security. That feature used to work in Adobe Acrobat (allowing AES256 encryption), PDF24, PDFXchange and a couple other PDF readers I have tried over the past.

Workaround: Export as single-layer multipage TIFF, then convert back to PDF again. Since LibreOffice Draw can’t do that, you’re stuck with Poppler, ImageMagic and GhostScript:

pdftoppm -tiff in.pdf blah
convert blah*.tif out.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dQUIET -dBATCH -dPrinted=false -sOutputFile=out_compressed.pdf out.pdf
rm in.pdf
rm blah*.tif
rm out.pdf
mv out_compressed.pdf out.pdf

I think, you get the gist of it.

If you think there is a bug, please file it at bugzilla. This is not the place for bug-reports.
https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&bug_severity=normal
.
The topic of this thread was not encryption, but the protection of contents from copy/print-attempts by regular users, wich usually will have the password to read the document. As this is a quite different problem your topic may be worth an own topic besides the bug-report, but this thread is not the right place.

Not a good idea, unless you print this yourself. The “hidden” text is still searchable in the pdf-file…

Have you considered using Tools > Redact in the Draw menu?

Have you considered using Tools > Redact in the Draw menu?

Yes I have - and it does not change anything. Black rectangles drawn over text to hide it are still editable if the document is exported with LibreOffice Draw via File > Export > PDF with PDF password encryption set by Security > Set Passwords > Set permission password > Changes (o) Not permitted without even knowing - or in case of InkScape having to provide the/a password.

The topic of this thread was not encryption

The topic of my post was not encryption either. While you can (and probably should) encrypt a document with a password to protect it from unauthorized opening, protecting a document from changes (“read only view” if you will) is tricky if you do not want to store a separate version of the content where all elements a baked in and the real vector data encrypted with the permission password. I’m pretty sure LibreOffice Draw does not do this.

So the topic of my post is, that even changing the “modification allowed” flag (and that is what it actually is) by providing a proper password does not work in LibreOffice Draw. I can hit [CANCEL] when being asked for it and then continue with a fully modifiable document. This is clearly a bug which I will file in Bugzilla if there is not a similar one already present and Bugzilla lets me do this.

Simply put: LibreOffice Draw PDF protection is not working. Not in the way @bobarebob wants it to work and not in the way I want it to work. Even removing the “W” attribute from the file does a better job (try it!) which convinces me that theoretically LibreOffice Draw can handle that situation. It’s just broken.

The “hidden” text is still searchable in the pdf-file…

That you can still get to the text mentioned in my example by dissecting the PDF is another story. Which I am 100% aware of. Or why else would I have provided instructions to “bake” the black mask over the text using and intermediate TIFF (=bitmap) format? All I wanted to achieve is an easy, straightforards way to hide some information from and unskilled user without unnecessarily bloating or degrading an already existing PDF file (which originally was a scanned document in my case). No CIA-NSA-CSSS level of security.

Why do only half the redaction job and expect good results? The pdf export is listed in Tools > Redact
ExportRedactedPDF

1 Like

@EarnestAl: That worked great. And without having to fiddle with password protection. Thanks for explaining!

tdf#49697
tdf#55425
tdf#107007