I'm trying to convert a standard PDF into a PDF/A with unoconv-0.9.0. However, it turns out that it fails when it tries to overwrite the file it's working on:
august@DESKTOP:~$ unoconv -f pdf test.pdf
unoconv: UnoException during export phase:
Unable to store document to file:///home/august/test.pdf (Error (com.sun.star.io.IOException){ (com.sun.star.uno.Exception){ Message = (string)"SfxBaseModel::impl_store <file:///home/august/test.pdf> failed: 0x4c0c(Error Area:Sfx Class:Write Code:12)", Context = (com.sun.star.uno.XInterface)0x0{} } })
Properties: ((com.sun.star.beans.PropertyValue){ Name = (string)"FilterName", Handle = (long)0x0, Value = (any){ (string)"writer_pdf_Export" }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"OutputStream", Handle = (long)0x0, Value = (any){ (com.sun.star.uno.XInterface)0x1d75858{, supportedInterfaces={com.sun.star.io.XOutputStream,com.sun.star.lang.XTypeProvider}} }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE }, (com.sun.star.beans.PropertyValue){ Name = (string)"Overwrite", Handle = (long)0x0, Value = (any){ (boolean)true }, State = (com.sun.star.beans.PropertyState)DIRECT_VALUE })
(PDF attributes I would actually use not used for this example)
Outputting to a different location works fine:
august@DESKTOP:~$ unoconv -f pdf -o test2.pdf test.pdf
I tried using soffice myself, but it appears that it simply exits because it's satisfied that the file has the correct extension already.
Workarounds for replacing the original files with the files from an output directory automatically welcome!
I'm trying to convert a standard PDF into a PDF/A with
unoconv-0.9.0
. However, it turns out that it fails when it tries to overwrite the file it's working on:(PDF attributes I would actually use not used for this example)
Outputting to a different location works fine:
I tried using
soffice
myself, but it appears that it simply exits because it's satisfied that the file has the correct extension already.Workarounds for replacing the original files with the files from an output directory automatically welcome!