<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting started with the OpenOffice.org API part II : some basic Writer operations</title>
	<atom:link href="http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/feed/" rel="self" type="application/rss+xml" />
	<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations</link>
	<description></description>
	<lastBuildDate>Fri, 12 Apr 2013 10:04:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Phong Nguyen</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3459</link>
		<dc:creator>Phong Nguyen</dc:creator>
		<pubDate>Fri, 25 Feb 2011 19:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3459</guid>
		<description><![CDATA[Could I export only the first page of a document?
Any help will be approcated.]]></description>
		<content:encoded><![CDATA[<p>Could I export only the first page of a document?<br />
Any help will be approcated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: martin joseph</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3458</link>
		<dc:creator>martin joseph</dc:creator>
		<pubDate>Fri, 20 Feb 2009 06:35:52 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3458</guid>
		<description><![CDATA[Hai Wouter van Reeven,

thanks for the reply .....
sorry for not being grateful enough .
i was able to insert bookmarks like i wanted .. thanks to your suggestion.

after i made my first post .... i kinda moved out of openoffice api and all ...

but now i am desperately in need of your help.

I will describe my problem as clearly as i can.

I am making an application.. which needs to embed open office within  java awt/swing application
This i was able to do using some Officebean without much lines of code .(i used the office bean directly without subclassing it)

For this i have an awt frame with a menu bar.
at click of a menuitem i added a panel with some buttons and also the officebean.

now what i want is , when i click one of those buttons in the panel a particular bookmark should be inserted
in the document in the officebean

the examples i came across which insert bookmarks dont use officebean. So i am in a dilemma.

Also i would want to be able to list out the bookmarks in the document in the officebean in a listbox outside the
officebean

sorry if i have confused you ...
I would be very grateful if you could help in any way]]></description>
		<content:encoded><![CDATA[<p>Hai Wouter van Reeven,</p>
<p>thanks for the reply &#8230;..<br />
sorry for not being grateful enough .<br />
i was able to insert bookmarks like i wanted .. thanks to your suggestion.</p>
<p>after i made my first post &#8230;. i kinda moved out of openoffice api and all &#8230;</p>
<p>but now i am desperately in need of your help.</p>
<p>I will describe my problem as clearly as i can.</p>
<p>I am making an application.. which needs to embed open office within  java awt/swing application<br />
This i was able to do using some Officebean without much lines of code .(i used the office bean directly without subclassing it)</p>
<p>For this i have an awt frame with a menu bar.<br />
at click of a menuitem i added a panel with some buttons and also the officebean.</p>
<p>now what i want is , when i click one of those buttons in the panel a particular bookmark should be inserted<br />
in the document in the officebean</p>
<p>the examples i came across which insert bookmarks dont use officebean. So i am in a dilemma.</p>
<p>Also i would want to be able to list out the bookmarks in the document in the officebean in a listbox outside the<br />
officebean</p>
<p>sorry if i have confused you &#8230;<br />
I would be very grateful if you could help in any way</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: site admin</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3457</link>
		<dc:creator>site admin</dc:creator>
		<pubDate>Thu, 27 Nov 2008 22:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3457</guid>
		<description><![CDATA[&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;You should move the text cursor to the end first. By default the
cursor is at the start of the text. Please see my other code for how to
do this.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Wouter&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>You should move the text cursor to the end first. By default the<br />
cursor is at the start of the text. Please see my other code for how to<br />
do this.</p>
<p>HTH,</p>
<p>Wouter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: martin joseph</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3456</link>
		<dc:creator>martin joseph</dc:creator>
		<pubDate>Wed, 26 Nov 2008 09:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3456</guid>
		<description><![CDATA[hey Wouter van Reeven

thank you for the 2-part article ....though i found the developer&#039;s guide had useful examples , i wasnt sure what the methods were meant to do and what the arguments were for ..Your article helped me a lot ..
now could u help me a bit more

i need to insert text into bookmarked fields of a template file . from ur code samples i was able to find the bookmarked fields ...but i cant seem to understand how to insert text after the bookmarked field...

say i have bookmarks

doctor
patient
.....

i want to insert a name after the bookmarks like

doctor martin joseph
patient raju

.
but my code (not actually mine combination of samples from ur article and a few other examples) inserts the name
like
martin josephdoctor


the portion of the code i want to edit is


String b1=&quot;Clinic &quot;;

XTextRange textRange = null;
Object bmk=null;
XNameAccess bookmarkNames = bookmarksSupplier.getBookmarks();
 bmk= bookmarkNames.getByName(b1);
 XTextContent bookmarkContent = (XTextContent)
            UnoRuntime.queryInterface(XTextContent.class, bmk);
textRange =bookmarkContent.getAnchor();
xText.insertString(textRange,&quot;Santa Clara&quot; , false);

where b1 is the first bookmark]]></description>
		<content:encoded><![CDATA[<p>hey Wouter van Reeven</p>
<p>thank you for the 2-part article &#8230;.though i found the developer&#8217;s guide had useful examples , i wasnt sure what the methods were meant to do and what the arguments were for ..Your article helped me a lot ..<br />
now could u help me a bit more</p>
<p>i need to insert text into bookmarked fields of a template file . from ur code samples i was able to find the bookmarked fields &#8230;but i cant seem to understand how to insert text after the bookmarked field&#8230;</p>
<p>say i have bookmarks</p>
<p>doctor<br />
patient<br />
&#8230;..</p>
<p>i want to insert a name after the bookmarks like</p>
<p>doctor martin joseph<br />
patient raju</p>
<p>.<br />
but my code (not actually mine combination of samples from ur article and a few other examples) inserts the name<br />
like<br />
martin josephdoctor</p>
<p>the portion of the code i want to edit is</p>
<p>String b1=&#8221;Clinic &#8220;;</p>
<p>XTextRange textRange = null;<br />
Object bmk=null;<br />
XNameAccess bookmarkNames = bookmarksSupplier.getBookmarks();<br />
 bmk= bookmarkNames.getByName(b1);<br />
 XTextContent bookmarkContent = (XTextContent)<br />
            UnoRuntime.queryInterface(XTextContent.class, bmk);<br />
textRange =bookmarkContent.getAnchor();<br />
xText.insertString(textRange,&#8221;Santa Clara&#8221; , false);</p>
<p>where b1 is the first bookmark</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: babu</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3455</link>
		<dc:creator>babu</dc:creator>
		<pubDate>Thu, 17 May 2007 21:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3455</guid>
		<description><![CDATA[I am converting html to pdf. i saved the following html file http://www.chem.vt.edu/RVGS/ACT/notes/Types_of_Equations.html in my local drive. The First time i convert the file , it works perfectly but if i try it again on the same file, the last few pages are skipped, and when i restart my machine, again it will work perfectly the first time, however in the subsequent conversions  the last few pages are skipped. I can send the code i am using
propertyValues[1].Name = &quot;FilterName&quot;;
propertyValues[1].Value = &quot;writer_pdf_Export&quot;; for output file storeToURl method
and i am using propertyValues[1].Name = &quot;FilterName&quot;; propertyValues[1].Value =  &quot;HTML (StarWriter)&quot;;  while opening the html file in the loadComponentFromURL method. help will be appreciated.]]></description>
		<content:encoded><![CDATA[<p>I am converting html to pdf. i saved the following html file <a href="http://www.chem.vt.edu/RVGS/ACT/notes/Types_of_Equations.html" rel="nofollow">http://www.chem.vt.edu/RVGS/ACT/notes/Types_of_Equations.html</a> in my local drive. The First time i convert the file , it works perfectly but if i try it again on the same file, the last few pages are skipped, and when i restart my machine, again it will work perfectly the first time, however in the subsequent conversions  the last few pages are skipped. I can send the code i am using<br />
propertyValues[1].Name = &#8220;FilterName&#8221;;<br />
propertyValues[1].Value = &#8220;writer_pdf_Export&#8221;; for output file storeToURl method<br />
and i am using propertyValues[1].Name = &#8220;FilterName&#8221;; propertyValues[1].Value =  &#8220;HTML (StarWriter)&#8221;;  while opening the html file in the loadComponentFromURL method. help will be appreciated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priyanka</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3454</link>
		<dc:creator>priyanka</dc:creator>
		<pubDate>Wed, 07 Feb 2007 13:36:22 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3454</guid>
		<description><![CDATA[i am trying to wite a java program that opens a writer document and exports it to html....

XStorable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, xComp);
PropertyValue[] storeProps = new PropertyValue[1];
storeProps[0] = new PropertyValue();
storeProps[0].Name = &quot;FilterName&quot;;
storeProps[0].Value = &quot;HTML (StarWriter)&quot;;
xStorable.storeToURL(&quot;C:\\test.html&quot;,storeProps);


I have gone through all the sample code I could find, and I still get a com.sun.star.task.ErrorCodeIOException...
i also want to save this code just as an Openoffice document ......it still gives the same exception ...
xStorable.storeAsURL(&quot;C:\\test.odt&quot;,storeProps);


plz help]]></description>
		<content:encoded><![CDATA[<p>i am trying to wite a java program that opens a writer document and exports it to html&#8230;.</p>
<p>XStorable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, xComp);<br />
PropertyValue[] storeProps = new PropertyValue[1];<br />
storeProps[0] = new PropertyValue();<br />
storeProps[0].Name = &#8220;FilterName&#8221;;<br />
storeProps[0].Value = &#8220;HTML (StarWriter)&#8221;;<br />
xStorable.storeToURL(&#8220;C:\\test.html&#8221;,storeProps);</p>
<p>I have gone through all the sample code I could find, and I still get a com.sun.star.task.ErrorCodeIOException&#8230;<br />
i also want to save this code just as an Openoffice document &#8230;&#8230;it still gives the same exception &#8230;<br />
xStorable.storeAsURL(&#8220;C:\\test.odt&#8221;,storeProps);</p>
<p>plz help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajeev E</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3453</link>
		<dc:creator>Rajeev E</dc:creator>
		<pubDate>Wed, 13 Dec 2006 14:41:08 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3453</guid>
		<description><![CDATA[Great, this article really did get me started with OOo Api. For a fortnight I tried deciphering the guide and well, wasted a whole lot of time. This does give the concepts so that I can put the delvelopers guide to good use
Thanks a lot
Rajeev]]></description>
		<content:encoded><![CDATA[<p>Great, this article really did get me started with OOo Api. For a fortnight I tried deciphering the guide and well, wasted a whole lot of time. This does give the concepts so that I can put the delvelopers guide to good use<br />
Thanks a lot<br />
Rajeev</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Smith (OopScope)</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3452</link>
		<dc:creator>Christopher Smith (OopScope)</dc:creator>
		<pubDate>Fri, 11 Aug 2006 23:38:17 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3452</guid>
		<description><![CDATA[Thanks. This helped a lot... the storeToUrl as opposed to storeAsUrl is key to the pdf export.

Unfortunately the OOo develper&#039;s guide, while having a huge quantity of information, does not contain some of the essentials such as tables of PropertyValues for each method. The API documentation is sparse as well. I have yet to find one example that works as advertised without some trial and error.

Once things are working in OOo, however, they are fast and reliable in contrast to the MSOffice suite.

Two small utility methods that I add to my OO access classes or a util class are:

   private PropertyValue newPropertyValue(String name, Object value) {
        PropertyValue pv = new PropertyValue();
        pv.Name = name;
        pv.Value = value;
        return pv;
    }

    private PropertyValue newPropertyValue(String name, boolean value) {
        return newPropertyValue(name, new Boolean(value));
    }

This condenses the propertyValue creation to a little more readable form:

PropertyValue[] storeProps = new PropertyValue[] {
newPropertyValue(&quot;FilterName&quot;,&quot;writer_pdf_Export&quot;),
newPropertyValue(&quot;CompressMode&quot;,&quot;0&quot;)};

Chris]]></description>
		<content:encoded><![CDATA[<p>Thanks. This helped a lot&#8230; the storeToUrl as opposed to storeAsUrl is key to the pdf export.</p>
<p>Unfortunately the OOo develper&#8217;s guide, while having a huge quantity of information, does not contain some of the essentials such as tables of PropertyValues for each method. The API documentation is sparse as well. I have yet to find one example that works as advertised without some trial and error.</p>
<p>Once things are working in OOo, however, they are fast and reliable in contrast to the MSOffice suite.</p>
<p>Two small utility methods that I add to my OO access classes or a util class are:</p>
<p>   private PropertyValue newPropertyValue(String name, Object value) {<br />
        PropertyValue pv = new PropertyValue();<br />
        pv.Name = name;<br />
        pv.Value = value;<br />
        return pv;<br />
    }</p>
<p>    private PropertyValue newPropertyValue(String name, boolean value) {<br />
        return newPropertyValue(name, new Boolean(value));<br />
    }</p>
<p>This condenses the propertyValue creation to a little more readable form:</p>
<p>PropertyValue[] storeProps = new PropertyValue[] {<br />
newPropertyValue(&#8220;FilterName&#8221;,&#8221;writer_pdf_Export&#8221;),<br />
newPropertyValue(&#8220;CompressMode&#8221;,&#8221;0&#8243;)};</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter van Reeven</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3451</link>
		<dc:creator>Wouter van Reeven</dc:creator>
		<pubDate>Mon, 26 Jun 2006 09:01:51 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3451</guid>
		<description><![CDATA[Hi Lucas,


Thanks. I didn&#039;t put my presentation online yet as I got too much carried away writing these two articles. And I didn&#039;t create a Powerpoint presentation, but an Impress presentation. I did convert it to Powerpoint and handed it over to the NL-JUG people during the conference so I suppose it will be put online there any time soon. Our next Knowledge Center session will be about OOo (if I&#039;m not mistaken) so you&#039;ll get to see my presentation there anyway.


Greets, Wouter]]></description>
		<content:encoded><![CDATA[<p>Hi Lucas,</p>
<p>Thanks. I didn&#8217;t put my presentation online yet as I got too much carried away writing these two articles. And I didn&#8217;t create a Powerpoint presentation, but an Impress presentation. I did convert it to Powerpoint and handed it over to the NL-JUG people during the conference so I suppose it will be put online there any time soon. Our next Knowledge Center session will be about OOo (if I&#8217;m not mistaken) so you&#8217;ll get to see my presentation there anyway.</p>
<p>Greets, Wouter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucas Jellema</title>
		<link>http://technology.amis.nl/2006/06/22/getting-started-with-the-openofficeorg-api-part-i-some-basic-writer-operations/#comment-3450</link>
		<dc:creator>Lucas Jellema</dc:creator>
		<pubDate>Mon, 26 Jun 2006 07:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://technology.amis.nl/blog/?p=1244#comment-3450</guid>
		<description><![CDATA[Wouter,

Great article and a very good way to get me started on using the OO API. This makes programmatic manipulation of high quality documents - and indirectly even Microsoft Office documents - a realistic option. The opportunities seem to be enormous.

Can we find the presentation you did on this for the NL-JUG conference on line somewhere? Did you really create your PowerPoint presentation for that session from Java?

regards

Lucas]]></description>
		<content:encoded><![CDATA[<p>Wouter,</p>
<p>Great article and a very good way to get me started on using the OO API. This makes programmatic manipulation of high quality documents &#8211; and indirectly even Microsoft Office documents &#8211; a realistic option. The opportunities seem to be enormous.</p>
<p>Can we find the presentation you did on this for the NL-JUG conference on line somewhere? Did you really create your PowerPoint presentation for that session from Java?</p>
<p>regards</p>
<p>Lucas</p>
]]></content:encoded>
	</item>
</channel>
</rss>
