以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 SVG/GML/VRML/X3D/XAML 』  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  [转帖]安裝新的 svg filter for OO.o  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=14793)


--  作者:SCYANGYU
--  发布时间:2/25/2005 1:34:00 PM

--  [转帖]安裝新的 svg filter for OO.o
OOo 的 SVG filter(export) 一直在進步中,以下是安裝新的 SVG filter 的方法:

cd $HOME/.openoffice/user/uno_packages
wget http://graphics.openoffice.org/svg/svgexport.zip
cd

關閉所有 OOo 相關程式,然後執行:

/usr/lib/openoffice/program/pkgchk

請自行找到你系統上的這支程式的置放處。

執行 OOo draw 在 [File] -> [Export] 的匯出的選項就會多出一個

SVG – Scalable Vector Graphics (new)(.svg)

的選項可選擇。

參考文件:
http://graphics.openoffice.org/svg/svg.htm

http://free.tnc.edu.tw/modules/news/article.php?storyid=1584


--  作者:SCYANGYU
--  发布时间:2/25/2005 1:35:00 PM

--  
Introduction
Based on the fact that the current SVG export filter available in OpenOffice has some drawbacks and lacks a proper design internally, I created a new filter module from ground up, that should be able to fulfill the needs we have in this area. Needs in this area are extracted from community feedback, customer requests and issues we currently have with the 'old' SVG export filter implementation.

Important: The current release of the new filter module is just meant to be a 'Technology Preview', that offers only basic functionality. It is in no way a complete product and shouldn't be used for production purposes. Please use this release at your own risk.


Features
The goal for this first release was to offer at least the same functionality as we currently have with the old filter, but with support for the export of multiple pages within one SVG file. The whole code currently available was written from scratch and should give us a 'Proof Of Concept' with the current release. It will be the basis for future releases and will be improved constantly. A concrete release schedule is currently not available.

What works so far
Support of latest available official specification (SVG 1.1)

Aspect ratio is preserved
PreserveAspectRatio attribute is set to xMidyMid

Usage of descriptive identifiers for several kinds of document objects
Slides/Master Slides as well as drawing objects and group objects get a description element within the SVG output, so that the document structure is kind of preserved. Named objects are also possible in this context

Separation of master slides and normal slides in one file

Support of multiple slides within one SVG file
The user should be able to travel through slides within a SVG viewer like Adobe's SVG Viewer or BATIK by just clicking the mouse. This feature has been realized by adding ECMA scripting to the SVG output.

Embedding of fonts
Fonts are now embedded, so that the output should be the same on different systems, even if the document font isn't available on the specific target system.

Exporting only single pages or all pages via API

What doesn't work so far
Textual bullets are not working very well, with different results on Unix and Windows from time to time

Shadow text and hollow text is not working
These attributes are not supported by the SVG specification, so that we'll have to fake this for correct results.

No single or page range export via UI
All pages are exported by default, you can't change the default via UserInterface to just export single pages

Many other things

What is planned next
Creation of an export dialog to support export of single pages and page ranges for example

Implementing support for different shapes like rects, ellipses and bezier curves instead of creating just simple polygons

Better font support

Better support of native SVG filling and stroking

Animations

Sound


Installation
Install an OpenOffice.org1.1 or newer if you have not done so already.

Download the package that contains the new version of the filter.

Copy the zip file in OpenOffice1.1/user/uno_packages folder (Note: USE the zip file as a whole, DO NOT extract it).

Open up a shell and switch to the OpenOffice1.1/program directory and start the pkgchk tool. On success, no output is given.

Alternatively, you can install the filter for all users of a OpenOffice.org network installation by placing the file into the OpenOffice1.1/share/uno_packages and starting
pkgchk --shared

You can uninstall the package by deleting the file in the uno_packages directory and starting pkgchk again.


Usage
Using the filter from within the application (UI)
After successful installation you should have a new filter entry inside the 'File=>Export' dialog available. The new filter is called SVG – Scalable Vector Graphics (new). The old SVG filter is still available.

As stated above, there's no export dialog available at the moment, so that all pages get exported in every case. This will be changed as soon as a filter dialog will be available.

Using the filter via API
You can use the filter via API in a very easy way. The Java code gives you an example of how to do this.

The following properties are supported so far:

OutputStream (interface ::com::sun::star::io::XOutputStream)
You can set the XoutputStream interface that should be used to export into the underlying stream

FileName (String)
As an alternative to the OutputStream, you can set the FileName property. In this case an output stream is created internally to write to the specified URL

PagePos (Integer)
You can specify which page to export here. Values between 0 and (PageCount-1) export the specified page, all other values export all pages. Default is -1.


Source Code
The source code for the new SVG export filter can be found inside the Framework project filter module. Please checkout this module and change directory to filter/source/svg to find the related code. Revisions for the current release are tagged with OOO_SVG_FILTER_0_1_0 and can be checked out with standard CVS commands.


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
6,917.969ms