pdf store safe export Stephan Wunderlich Tom Schindl How do I store a writer document as PDF

Use storeToURL with the right filtername

sUrl="file:///myhome/documents/source.sxw" oDocument=oDesktop.loadComponentFromURL(sUrl,"_blank",0,DimArray()) Dim args(0) as new com.sun.star.beans.PropertyValue args(0).Name = "FilterName" args(0).Value = "writer_pdf_Export" destination = "file:///myhome/documents/test.pdf" odocument.storeToURL(destination,args()) oDocument.close(true)
Modified to match new snippet-DTD Initial version