Showing posts with label export. Show all posts
Showing posts with label export. Show all posts

Monday, March 2, 2015

Publisher 2010 wont save export PDF nor XPS any more

After updating my system to Windows 8, Office 2010 Publisher quit saving files as PDF and XPS. The error message was:
"Publisher cannot save the file" or in german "Publisher kann Datei nicht speichern".
On a different computer the same file saved as PDF without problems.

How-i-fixed-it:
I found the right hints how to fix it here:
http://answers.microsoft.com/en-us/office/forum/office_2010-office_other/publisher-2010-error-when-try-to-save-a-file-as/e2df6b52-0359-447d-8b5d-7d4545052ea3

I changed my default printer to a different one than before and suprisingly  PDF and XPS export in Publisher was working fine again.

Read more »

Sunday, March 1, 2015

Export parts of Firefox bookmarks to HTML or Trac

After searching around on the web for a while, i decided to write my own little conversion tool to export only parts of my firefox bookmarks, e.g. subfolders, to a HTML-File or in TRAC format.
Heres how i did it:
I added the OPML Addon to my firefox: https://addons.mozilla.org/de/firefox/addon/2625
I exported my bookmarks to an OPML-File, which is just XML.
Next i create a little XSL-Stylesheet that converts the OPML to the desired format.
To convert OPML to TRAC links the XSLT looks like this (OPML2TRAC.xsl):

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-16" media-type="text/plain" omit-xml-declaration="yes" indent="no"/>
<xsl:variable name="exportRootFolderName">PlaceTheNameOfYourSubfolderHere</xsl:variable>
<xsl:template match="/">
<xsl:for-each select="//outline[@text=$exportRootFolderName]">
<xsl:call-template name="outlineConvert"></xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="outlineConvert">
<xsl:for-each select="outline[@url != ]">
<xsl:sort select="@text" />[<xsl:value-of select="./@url" disable-output-escaping="yes"/><xsl:text> </xsl:text><xsl:value-of select="./@text"/>]<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


To convert OPML to HTML links the XSLT looks like this (OPML2HTML.xsl):

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-16" media-type="text/html" omit-xml-declaration="yes" indent="no"/>
<xsl:variable name="exportRootFolderName">PlaceTheNameOfYourSubfolderHere</xsl:variable>
<xsl:template match="/">
<xsl:for-each select="//outline[@text=$exportRootFolderName]">
<xsl:call-template name="outlineConvert"></xsl:call-template>
</xsl:for-each>
</xsl:template>
<xsl:template name="outlineConvert">
<html>
<body>
<h2>My Bookmarks</h2>
<table border="1">
<xsl:for-each select="outline[@url != ]">
<xsl:sort select="@text" />
<tr>
<td>
<a>
<xsl:attribute name="href">
<xsl:value-of select="./@url"/>
</xsl:attribute>
<xsl:value-of select="./@text"/>
</a>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Replace the "PlaceTheNameOfYourSubfolderHere" value with the name of the Subfolder of your firefox bookmarks.

In the head of the OPML-File insert the reference to the XSL-File:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="opml2trac.xsl"?>
<opml version="1.0">
... Rest of the OPML file ...

Open the OPML in Firefox or Internet Explorer now. You should then see the converted result.

You can also use a XSLT-Processor, e.g. MSXSL to do the conversion.
Read more »