Description: Hi. I'm developing a free opensource software for lawfirms. I get a very satisfying workflow using the ability of LibreOffice to open webdav links (https://cloud.mydomain.com/files/test.odt). The only anoying thing is with PDF files. They open fine with DRAW. I can easily edit them. But when I want to save, it doesn't save back the PDF on the WEBDAV remote location. It asks to save in ODG format LOCALLY. I also tried to use "EXPORT DIRECTLY AS PDF" but instead of saving back to the WEBDAV, it once again ask to save the PDF LOCALLY. My suggestion : if DRAW opens a PDF, it should save as PDF directly on the WEBDAV. Or at least it should save on the WEBDAV when choosing EXPORT DIRECTLY AS PDF. What do you think about that ? Steps to Reproduce: 1.Open a PDF in DRAW from a webdav link (example : https://cloud.mydomain.com/test.pdf) 2.Edit the PDF, for example move a text box 3.Save the PDF Actual Results: It asks to save locally as ODG format Export Directly to PDF function asks to save a new pdf locally Expected Results: It should save as PDF at the remote location, like WRITER does with ODT files opened from WEBDAV. At least, if that's not possible, the EXPORT DIRECTLY AS PDF function should save remotely and not ask to create a new file locally Reproducible: Always User Profile Reset: No Additional Info: Thanks for the amazing work on Libreoffice !
LibreOffice deliberately uses *different* import and export filters for PDF, which makes the format not editable, and PDF appearing only in Export dialog, not in Save As. LibreOffice is not developed as a PDF editor. Its support for PDFs is very limited, in many areas: from major shortcomings (like not supporting different page layouts in a single Draw file, which might improve over time) to things that may not change - such as incompatible document model, which prevents LO from keeping most of original PDF internal structure/metadata when round-tripping. Pretending that LO "supports" PDF editing would result in much user confusion, when people will expect LO to keep the information it can't, and many bug reports for something that is not meant to work anyway. WONTFIX IMO.
I totally understand your point about user confusion. Then let me rephrase. it's mainly a workflow problem. All I want is the ability to EXPORT my work at the same place that was opened. If I open file.pdf on my DAV, I want it to export the changes by overwriting the same file.pdf at the same remote location without asking any question. That's exactly what Writer is doing when opening an ODT file through a remove webdav link. Without this workflow my users can't save their changes to their webdav server. They have to : - configure the SAVE AS REMOTE and brows to the good directory. - mount their webdav as a disk My users are lawyers and just don't understand that kind of stuff. What is missing is just a function called "EXPORT -> SAVE PDF AT REMOTE DIRECTLY"
Saving (or exporting) to the same location is exactly pretending that the format is considered editable and supported read-write format. This is not true for PDF. For now the request is WONTFIX. However, this is exactly the task for custom macros, when someone has some specific needs, and understands that their workflow has limitations, but needs something that is not supported by the program. Here is such a macro, which you may put to common library for your users, and create a button for it: Sub ExportAsSelf doc = ThisComponent If doc.hasLocation and not doc.isReadonly Then url = doc.getLocation doc.storeToURL(url, array()) doc.setModified(false) End If End Sub
(In reply to Mike Kaganski from comment #3) > Saving (or exporting) to the same location is exactly pretending that the > format is considered editable and supported read-write format. This is not > true for PDF. For now the request is WONTFIX. > True, as the PDF opening filter had developed--the consensus had been that the export filter round-trip would never overwrite the PDF source document. LibreOffice is not a PDF editor. But export handling was changed for https://bugzilla.redhat.com/show_bug.cgi?id=1673198 and bug 103947, with https://gerrit.libreoffice.org/c/core/+/67491 So a PDF opened in Draw *can* be exported to overwrite its source, at least locally. If not the case with a WebDav linkage, that is something different?
Sorry for the incomplete macro. The one in comment 3 will save the file with PDF extension, but in ODF format. Here is the better one: Sub ExportAsSelf doc = ThisComponent If doc.hasLocation And Not doc.isReadonly Then url = doc.getLocation args = doc.getArgs For i = LBound(args) To UBound(args) If args(i).Name = "FilterName" Then If args(i).Value = "draw_pdf_import" Then args(i).Value = "draw_pdf_Export" End If Next i doc.storeToURL(url, args) doc.setModified(false) End If End Sub
Thanks for the MACRO I'll try that !