| <!-- ======================================================================== |
| $RCSfile: Writer.StoreWriterAsPDF.snip,v $ |
| |
| last change: $Revision: 1.5 $ $Author: tomsontom $ $Date: 2004/08/16 09:57:44 $ |
| |
| (c)2003 by the copyright holders listed with the author-tags. |
| If no explicit copyright holder is mentioned with a certain author, |
| the author him-/herself is the copyright holder. All rights reserved. |
| |
| Public Documentation License Notice: |
| |
| The contents of this Documentation are subject to the |
| Public Documentation License Version 1.0 (the "License"); |
| you may only use this Documentation if you comply with |
| the terms of this License. A copy of the License is |
| available at http://www.openoffice.org/licenses/PDL.html |
| |
| The Original Documentation can be found in the CVS archives |
| of openoffice.org at the place specified by RCSfile: in this header. |
| |
| The Initial Writer(s) of the Original Documentation are listed |
| with the author-tags below. |
| |
| The Contributor(s) are listed with the author-tags below |
| without the marker for being an initial author. |
| |
| All Rights Reserved. |
| ======================================================================== --> |
| |
| <snippet language="OOBasic" application="Writer"> |
| |
| <keywords> |
| <keyword>pdf</keyword> |
| <keyword>store</keyword> |
| <keyword>safe</keyword> |
| <keyword>export</keyword> |
| </keywords> |
| |
| <authors> |
| <author id="ste" email="sw@openoffice.org">Stephan Wunderlich</author> |
| <author id="tomsontom" email="tom.schindl@bestsolution.at">Tom Schindl</author> |
| </authors> |
| |
| <question heading="export as PDF"> |
| How do I store a writer document as PDF |
| </question> |
| |
| <answer> |
| <p> |
| Use storeToURL with the right filtername |
| </p> |
| <listing> |
| 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) |
| </listing> |
| </answer> |
| |
| <changelog> |
| <change author-id="tomsontom" date="2004-06-22">Modified to match new snippet-DTD</change> |
| <change author-id="ste" date="0000-00-00">Initial version</change> |
| </changelog> |
| |
| </snippet> |