Quick.SVG 2005 CGM-to-SVG Edition Help Documentation

Quick.SVG 2005 CGM-to-SVG Edition Help Documentation

You may download the PDF version of this document here.
Load frameset.
Software Name: Quick.SVG 2005
Software Description: Converts CGM4, WebCGM, ATA CGM and WMF to SVG
Software Version Number: 1.0.2
Version Release Date: December 15th, 2004
Original Release Date: December 15th, 2004
Software Author: DocSoft, Inc.
Author Website: http://wwww.docsoft.com/
Author Phone: 1.877.430.3502 or 1.405.236.2466
Documentation Version Number: 1.0.2
Last Updated: Wednesday, February 23, 2005 4:25:47 PM
Support Site: http://forums.docsoft.com/
Source Filename: qsvg2005Help.xml
Microsoft, Windows, Internet Explorer and .NET are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.Adobe and Adobe SVG Viewer are either registered trademarks or trademarks of Adobe Systems Inc. in the United States and/or other countries.DocSoft and the DocSoft logo are either registered trademarks or trademarks of DocSoft Incorporated in the United States and/or other countries.SVG images in this document were converted from the National Institute of Standards and Technology (NIST) CGM Test Suite.

Introduction

DocSoft's Quick.SVG quickly and easily converts WebCGM, CGM4 and ATA CGM to pure, Scalable Vector Graphics (SVG). SVG is an XML-based graphics format that is supported by the World Wide Web Consortium (W3C).

Quick.SVG is the first CGM-to-SVG conversion software that converts CGM binary elements into similar or equal SVG elements. This means that it doesn't just convert all the CGM data into a series of small, straight polylines; it converts the binary elements into the closest available SVG element, which decreases file size and improves usability after conversion. This allows for full use of the SVG after the conversion to create symbols, provide valid searchability and allow for database connectivity.

What is SVG?

Scalable Vector Graphics (SVG) is a very powerful language for describing two-dimensional vector and mixed vector/raster graphics in XML. SVG was designed to integrate with other Web standards such as XML Namespaces, XML DOM, CSS and XSLT, and can also be easily integrated into other non-web applications. SVG can be panned and zoomed with no "aliasing" or loss of quality. SVG graphics can use CSS Stylesheets to control the look and feel of the image, and scripting to provide interactivity and animation. The specification also provides some complex functionality such as filters, gradients and fills. SVG has become the de facto standard for web presentation of vector graphics.

As an XML grammar, SVG is platform independent and non-proprietary. It is also a text-based format, and can therefore be edited using a simple text editor or edited using one of many quality commercially available editors. And since it is text-based, it can be indexed by a search engine, thereby making your graphics searchable!

System Requirements

Please review the following requirements to ensure optimum application performance and operability:



NOTE:

Windows XP with Service Pack 2 users may find an annoying occurrence when launching SVGs within the Quick.SVG viewing window due to a change in the handling of script handling for plug-ins and ActiveX controls. You may choose to turn off this option in Internet Explorer's options dialog.



Quick.SVG Features

Quick.SVG has many features to make batch conversion as painless as possible. Below is a list of some important features available in Quick.SVG 2005.

Packaged CD-ROM Installation

If you have purchased the Quick.SVG on CD-ROM, use the following procedure to install this software.

  1. Insert the Quick.SVG 2005 CD-ROM into your CD-ROM drive.
  2. If Autorun is enabled, a menu will appear. If you do not have the Adobe SVG Viewer installed, the autoplay menu will display an "Install Adobe SVG Viewer" button (as shown in Figure 1).
  3. If you have the Adobe SVG Viewer installed, the autoplay menu will not display the "Install Adobe SVG Viewer" link (as shown in Figure 2).



  4. Figure 1 - Autorun Menu When Adobe SVG Viewer Not Installed




    Figure 2 - Autorun Menu When Adobe SVG Viewer Is Installed

  5. If an autorun menu does not appear, navigate to your CD-ROM drive using Windows Explorer or My Computer, then perform the following.
    • Right-click on the CD-ROM drive. The label should read "Quick.SVG 2005" and have the Quick.SVG 2005 logo (as shown in Figure 3). A context menu will appear.
    • Choose the "Autorun" option from the context menu. This will launch the Quick.SVG autorun menu.



  6. Figure 3 - Context Menu to Launch Autorun Menu

  7. You must have an SVG browser plug-in installed before installing Quick.SVG 2005. If you do not have an SVG viewer installed, or if you want to install the Adobe SVG Viewer, please do so before installing Quick.SVG. Clicking the "Install Adobe SVG Viewer" button will take you to the Adobe SVG site to so you can download the latest version. After verifying the installation of an SVG browser plug-in, proceed to the next step.
  8. Click the "Install Quick.SVG 2005" button to install the software. Follow on-screen instructions.
  9. To view documentation for Quick.SVG, click the "View Documentation" button. This will open a PDF version of the documentation.
  10. To visit the official Quick.SVG website, click the "Visit Website" button.


  11. NOTE:

    You can view up-to-date Quick.SVG 2005 documentation on the DocSoft website at http://www.docsoft.com/help/.



Interface Overview

The following provides an overview of the Graphical User Interface for Quick.SVG 2005. Use Figure 4 and the following list for a description of the interface.

  1. Tool Bar Menu - The Tool Bar Menu provides quick access to the most commonly-used actions. See Tool Bar Menu Description for more information on each button.
  2. Tab View Window - Displays converted SVGs, CGMs, and SVG Source in a tabbed format. Also contains the Home (which displays recent workspace and recent CGM lists for quick access) and Log tabs.
  3. Status Bar - The status bar shows the status and progress information during the conversion process.
  4. Options Window - Displays current workspace settings to control output options and memory control. See Options Window Detailed Description for more details.
  5. Web Window - Provides access to Version Checking and User Forums. See Web Window Detailed Description for more details.
  6. Project Window - This window displays a list of Input/Output files. See Project Window Detailed Description for more details.



Figure 4 - Interface Description

Detailed Interface Description

The following information provides detailed information for each area of the Graphical User Interface for Quick.SVG 2005.

Tool Bar Menu Detailed Description

The following information describes each button's function within the Tool Bar Menu.

Add CGM File Button

Reference Figure 5. The Add CGM File Button launches the standard "Open" dialog that allows you to select one or multiple CGMs for conversion. To select multiple CGMs, press and hold the CTRL key to select single CGMs, or press and hold the Shift key to select a list of CGMs. The loaded CGMs will be placed in the Project Window under the Input node. CGMs under the input node are now ready for conversion.




Figure 5 - Add CGM File Button

Add CGM Folder Button

Reference Figure 6. The Add CGM Folder Button allows you to add entire folders to the Input node list for conversion. When clicked, it launches a "Browse for folder" dialog that allows you to select a folder of CGMs for conversion. You can select and add a different folder for a comprehensive list of CGMs added to the Input node.




Figure 6 - Add CGM Folder Button

New Workspace Button

Reference Figure 7. The Clear Input Folder Button removes all files listed in the Input node list and clears the current workspace. A dialog will appear asking "Are you sure you want to remove all items from the Input Folder?". Clicking OK will proceed with removal. Pressing Cancel will cancel the remove operation.




Figure 7 - New Workspace Button

Load Workspace Button

Reference Figure 8. The Load Workspace Button opens a previously-saved workspace and loads it into the project window. When the button is clicked, the standard open file dialog box opens, browse to the location of the workspace and select the desired workspace file. The CGMs associated with the project will be loaded into the Project Window.




Figure 8 - Load Workspace Button

Save Workspace Button

Reference Figure 9. The Save Workspace Button will save the current workspace to a file (extension *.qsb), if the current workspace has not previously been saved, a Save as dialog box will appear and prompt for a filename and location. Once the new workspace exists, clicking on the button will save the workspace without a prompt (unless it has been modified).




Figure 9 - Save Workspace Button

Show Log Button

Reference Figure 10. The Show Log Button displays log information for the current conversion in the Log tab, located on the Tab List.




Figure 10 - Show Log Button

Convert Button

Reference Figure 11. The Convert Button initiates the conversion process for the CGMs listed in the Input node. Converted SVGs appear in the Output node. A progress bar appears in the bottom right of the status bar which tracks the conversion of the batch. Next to the progress bar on the left is a percentage of completion of the batch conversion process. The conversion follows the rules set forth in the Options Window.




Figure 11 - Online Help Button

Stop Button

Reference Figure 12. The Stop Button stops the current conversion process. Enabled only during the conversion process (initiated either by the Convert Button or the right-clicking context menu on a CGM under the Input node).




Figure 12 - Enabled Stop Button

Help Button

Reference Figure 13. The Help Button opens the Quick.SVG 2005 Help Documentation.




Figure 13 - Help Button

Tab List Detailed Description

The Tab List displays a set of SVGs, CGMs and SVG Source for viewing. Each time a CGM or SVG is double-clicked on in the Input or Output Nodes, the associated file will load as a new, active tab in the Tab List Window. Double-clicking a file that is already loaded into the Tab List Window will focus the associated tab. (See Figure 14).



NOTE:

You must have a CGM viewer/plug-in installed to view CGMs within the Tab List Window.



The Home tab provides quick access to the Quick.SVG Recent Workspace and Recent Files lists. The Recent Workspace lists the last five (5) saved Workspaces. The Recent Files list displays the last five (5) CGMs that were loaded individually (the Add CGM Folder function will not populate this list).

The Log tab displays conversion information about the most recent conversion. This is useful when batch converting to see if any CGMs exceeded the thresholds set in the Thread Control settings.

Right-clicking on the Tab List will display a context menu with 2 options; Close Tab and Close All Tabs. Choosing the Close Tab option will close the tab on which you right-click upon. Choosing the Close All Tabs option will close all open SVG tabs, except the Home and Log tabs. (See Figure 15).

If you check the SVG Tab Output checkbox in the Output Settings box (refer to Figure 16), Then each SVG will appear in the Tab List window upon conversion. This is only recommended when converting 10 or less CGMs at a time.




Figure 14 - Tab List




Figure 15 - Right-Click Context Menu to Close Tab




Figure 16 - Quick.SVG Options Window - SVG Tab Output

Options Window Detailed Description

The Quick.SVG 2005 Options Window (see Figure 17) provides a method for setting memory options, thread control, output settings, and post conversion processing. The following information details each portion of the Options Window.




Figure 17 - Options Window

Thread Control

The Thread Control box (as shown in Figure 17) allows you to control how much time and memory to allocate on each CGM conversion. This is useful when you want to convert a large batch of CGMs. Some CGMs are quite detailed and may take a while to convert. Enabling maximum time (the Timeout option as shown in Figure 17) and maximum memory (the Memory option as shown in Figure 17) will allow you to convert the majority of the CGMs without getting "stuck" on one that takes a while to convert. You can always go back and process these big, complex CGMs later. The following information details each option within the Thread Control settings.

Timeout

The Timeout option allows you to control the maximum length of time used to convert for each CGM in the Input Folder. Default is 30 Seconds.

Memory

The Memory option allows you to allocate a maximum length of time to convert for each CGM listed in the Input Folder. Default is 100 MB. If the memory used during conversion of any of the CGMs listed in the Input Folder, the conversion will stop on that particular CGM and continue to the next in the list. Check the log for errors or Thread Control issues after each batch run.

Conversion

Maintain Aspect Ratio

The Maintain Aspect Ratio setting allows you to determine whether you want the exported SVG to maintain the original Aspect Ratio from the original CGM.

Viewport Translation

The Viewport Translation allows translation from the coordinate system of your CGM into any size Viewbox you wish. Output is always inverted-y left hand coordinate system, regardless of inversions on input coordinate system.

Output

The Output box allows you to set various output options relating to the exported SVGs. The following and details each item within the Output box.

SVG Tab Output

The SVG Tab Output, when checked, will open each converted SVG into the SVG Viewing Window during conversion. Not recommended when batching more than 10 conversions at once. When converting more than 10, you may view converted SVGs by double-clicking on a particular SVG in the Output Folder. Default is unchecked. See Tab List Detailed Description for more details.

Apply Transformations

Clicking on the link opens a form that is used to select XSLTs for post conversion processing. Also from this sub-form, specialized context menus can be created. The post conversion processing does not take place unless the check box on the options screen is selected. Please see Transformations for more information.

SVGZ

SVG can be stored in two types of formats, one is the basic plain text version, and the other is a compressed version called SVGZ. To enable the conversion to SVGZ, select the checkbox on the Options Window called SVGZ. Click on the link to open the above window for the SVGZ options.

Checking the Delete .svg files after zipping checkbox, causes the .svg file to be deleted after the .svgz has been created.

Setting a Threshold will check file size if the file size is greater then the Size Threshold then the file will be saved as a .svgz as opposed to an .svg. If the Threshold is not meet then the file is not saved as an .svgz. The threshold units are in Kilobytes.

Web Window Detailed Description

The Quick.SVG 2005 Web Window (see Figure 18) provides version checking and also provides a link to Geekspeak, DocSoft's online forums.




Figure 18 - Web Window

Once every 5 days, Quick.SVG 2005 checks to see if there is a new version available at the DocSoft website. If there is a new version, a Change Log dialog will open and show a history of the changes and provide a button to download the latest version from the web (as shown in Figure 26).




Figure 19 - Change Log Dialog

The Web Window will also display a status image for the updates, as shown in Figure 20, Figure 21 and Figure 22.

Also shown in the Web Window is DocSoft's user forums, "Geekspeak" (as shown in Figure 23. Geekspeak is an excellent resource for any kind of assistance related to Quick.SVG 2005, or any of our other software titles. We suggest you ask any and all questions here as this site is monitored daily by our staff.

Project Window Detailed Description

The Project Window displays a list of CGMs and converted SVGs for the current workspace. Use Figure 23 when referencing the following descriptions.




Figure 23 - Project Window

Input Node

CGMs to be converted are listed under the Input Node. Double-clicking an item in this list will open and display the CGM in a new tab (using your default CGM viewer plug-in), signified by a "gear" icon (as shown in Figure 24).

Right-clicking on a file under the Input Node will display a context menu, with the options of "Convert Selected" (which allows the user to convert one file at-a-time) or "Remove Selected" (which removes the file from the Input Node and Workspace) (as shown in Figure 25).




Figure 24 - CGM Displayed in Tab List




Figure 25 - Input Node Context Menu

Output Node

Converted SVGs are listed in the Output Node. Double-clicking an item in this list will open the SVG as a new tab in a new tab. If the SVG is already open, it will make the associated tab active for viewing.

Right-clicking on a file under the Output Node will display a context menu, with the options of "Remove Selected" (removes selected file from Workspace), "View Source (displays SVG source as a new tab in the Tab List)" and "Compare to CGM" (opens source CGM and converted SVG in the Compare Dialog).




Figure 26 - Output Node Context Menu

Compare Dialog



NOTE:

You must have a CGM viewer/plug-in installed in addition to an SVG Viewer to be able to use the Compare function. If no default viewer is found, a dialog will appear stating that Quick.SVG could not find a default viewer. If you know you have a CGM viewer installed and you get this dialog, it may be due to a file extension error. Please contact your systems administrator for assistance.



The Compare Dialog (reference Figure 23), displays the converted SVG and source CGM in a side-by-side format for comparison purposes. This will allow the end-user to compare converted SVG directly with the source CGMs for Quality Assurance.

The Compare Dialog can be launched from a context menu option under the Output Node (converted SVGs), or from the Menu Bar, under View > Compare All, the latter of which allows the end user to scroll through all conversions for comparison.




Figure 27 - Compare Dialog

Output Transformations and Filters

Quick.SVG provides for XSL transformations of the SVG files resulting from your conversions. In batch conversions these transformations will be preformed on each SVG as soon as it is outputted by the conversion engine. Your original SVG will not necessarily be preserved.

The following information and Figure 28 describe how to apply external XSLTs to handle links and metadata with source CGMs.




Figure 28 - Output Transformations and Filters Dialog



NOTE:

The Quick.SVG 2005 transformation engine supports XSLT 1.0 only. Please check the User Forums for news and updates.





NOTE:

When apply external XSLTs during the conversion process, you may experience a significant increase in the conversion rate. This increase is normal. Increase times depend of the host machine's processor speed and the complexity of the XSLT and/or the source SVG.



The “Output transformations and filters" dialog displays a list of all of the XSL and XSLT files that are located in your “filters" directory. It is launched by clicking on the "Apply Transformations" link in the Options Window. The "filters" directory is created during installation and exists in your application root directory. In the event that the directory is moved or renamed, a new one will be automatically created.

The User Transformations list box lists all the XSLT files within the "filters" directory. The order in which they are displayed in this list box is the order in which they will be applied during conversion. You may use the up and down arrows to move a file up in the order of transformations, so if you need to perform multi-level transformations, ensure the XSLTs are in the proper order. See Handling Application Structure And Link Data for detailed information on how to handle CGM metadata with XSLT.

The "Customizable Transformations" area provides the ability of creating a custom context menu (for the Adobe SVG Viewer Only) and adding to each of the SVGs during conversion. It creates an XML file that represents different actions and will be included into each exported SVG. You can save each custom context menu as an external XML file that can be used for future use. Just press the "Load" button to select a previously-saved XML context menu to load it. Ensure you check the "Custom context menu" checkbox and the Apply Transformations checkbox in the Options Window to apply your custom context menus.

Using the Adobe® SVG Viewer (ASV) Context Menu Editor

The Adobe® SVG Viewer (ASV) Context Menu Editor provides an intuitive GUI that creates an external XML file that can be applied to all SVGs during conversion. You can also create your own custom scripts that can be applied via XSLT (during conversion) and call to the scripts from the context menu.

The following provides a brief example of how to create and add a custom context menu to each exported SVG. For more detailed assistance, please visit GeekSpeak, DocSoft's User Forums.



NOTE:

The Adobe® SVG Viewer (ASV) Context Menu Editor is for use with Adobe's SVG Viewer only.



  1. The ASV Context Menu Editor dialog is launched by performing the following:
    • Click the Apply Transformations link in the Options Window (as shown in Figure 29). This opens the Output transformations and filters dialog.
    • Click the Edit link under Customizable Transformations (see Figure 30). This opens the ASV Context Menu Editor Dialog (as shown in Figure 31).



  2. Figure 29 - Apply Transformations Link In Options Window'




    Figure 30 - Edit Link Under 'Customizable Transformations'




    Figure 31 - ASV Context Menu Editor Dialog

  3. If a context menu has not been previously created, an empty context menu will appear (as shown in Figure 31). If a context menu has been previously created, the last-saved context menu will automatically load.
    • If you want to load a previously-saved context menu, press the Load button to launch an Open dialog in which you can choose a previously-created context menu (saved as XML).
    • If you want to start a new context menu, press the New button.
  4. To start a new context menu, begin by giving your context menu a descriptive name. In our example, we will call it My First Context Menu (as shown in Figure 32). This is only a descriptive name to assist the developer in identifying the context menu.



  5. Figure 32 - New Context Menu - 'My First Context Menu'

  6. Clicking on the Append Child button will display a 3-choice menu: Menu, Item and Separator (as shown in Figure 33).
    • Menu - A Menu creates a submenu
    • Item - An Item creates a menu item. You can select any number of system actions as defined in ASV System Action Commands. You can also call scripts from within the OnActivate field.
    • Separator - A Separator inserts a standard context menu separator bar.
    For more information on each element and its use, please see Adobe® SVG Viewer (ASV) contextMenu DOM or visit DocSoft's User Forums.



  7. Figure 33 - Menu Options From Append Child Button

  8. In this example we will choose an Item element. We will then select the ZoomIn built-in ASV system command as the Action. Use the Text field to enter text that will be displayed in the actual context menu. In the example, we have chosen to call this command Zoom In since our system command is ZoomIn (as shown in Figure 33).



  9. Figure 34 - ZoomIn Action For Item Element

  10. Too add another menu item, you may click on the Append Sibling button (as shown in Figure 35), or right-click on an item in the graphical view and choose an option. In this example, we will choose to insert another Item after our Zoom In action (as shown in Figure 36).



  11. Figure 35 - Choosing Actions From Append Sibling Button




    Figure 36 - Inserting Actions From Graphical View Context Menu

  12. After inserting additional commands, we might want to insert a separator. In the example below, we have chosen to insert a separator bar (Figure 37).



  13. Figure 37 - Inserting A Separator Bar

  14. To insert a Submenu, choose to insert a menu element, as shown in Figure 39.



  15. Figure 38 - Inserting A Submenu

  16. To insert Submenu items, choose Append Child from the Submenu node, then choose an item. In this example, we have chosen to insert another Item element (Figure 39).



  17. Figure 39 - Inserting A Submenu Item

  18. This time, we will utilize the XLink action as our first submenu item (as shown in Figure 40). Be sure to enter descriptive text in the Text field. Enter a proper URL in the XLink field utilizing http:// protocol.



  19. Figure 40 - Utilizing XLink System Action

  20. In our next submenu item, we will utilize the OnActivate action. You can enter simple JavaScript directly in this field without having to use the javascript: protocol (as shown in Figure 41). Ensure that you use single quotes as the onactivate attribute uses double quotes to call the function. In this example, we have entered descriptive text of Say Hello and utilized the OnActivate field to enter an alert (alert('Hello World')).



  21. Figure 41 - Simple Scripting In OnActivate Field

  22. You can also call to an external JavaScript or VBScript function using the OnActivate field. External scripts can be added to converted SVGs by creating and applying an XSLT during conversion. For more information on this feature, please see Handling CGM Application Data or visit http://forums.docsoft.com/ to ask a Quick.SVG 2005 expert.



  23. Figure 42 - Calling Custom Script In OnActivate Field

  24. When you are finished creating your context menu, press the Save button. This will launch the Save As dialog (Figure 43). We suggest you save your files in the Quick.SVG 2005 Application Directory "filters".



  25. Figure 43 - Saving Context Menu

  26. To apply your new context menu during conversion, load the context menu into the ASV Context Menu Editor by pressing the Load button and choosing the respective menu. After you have closed the ASV Context Menu Editor dialog, ensure you check the Custom Context Menu checkbox (as shown in Figure 44) on the Output Transformations and Filters dialog.



  27. Figure 44 - Custom Context Menu Checkbox

  28. Also ensure you have checked the Apply Transformations checkbox located in the Options Window (Figure 45) before conversion.



  29. Figure 45 - Apply Transformations Checkbox

  30. After successful conversion, each SVG in the workspace will have your new context menu applied (as shown in Figure 46).



  31. Figure 46 - Applied Context Menu

Adobe® SVG Viewer (ASV) contextMenu DOM

The following information was derived from http://wiki.svg.org/index.php/CustomizingContextMenu.

readonly dom::Document contextMenu

XML document that represents SVG Viewer's context menu. Any change to this document will be reflected on the context menu (when it pops up). The document's root element must be a "menu" element. The following elements are allowed in menu:

The item element can have following attributes (note that xlink:href attribute must be in XLink namespace, use only setAttributeNS to set it):

ASV System Action Commands

Supported system actions are listed here:

ZoomIn
ZoomOut
OriginalView
Quality
Pause
Mute
Find
FindAgain
Copy
CopySVG
ViewSVG
ViewSource
SaveAs
SaveOriginalAs
SaveSnapshotAs
Help
About

It is strongly recommended to have 'About' action in the menu. Menus without 'About' action may get ignored by the viewer.

Implementation Note: It is not possible in ASV3 to access the built-in functions of the context menu (such as "CopySVG" or "SaveAs") through script. This is a security feature.

Sample Context Menu XML Structure

The following is an example XML file that can be used for context menu creation. This sample was derived from

<defs>
<menu id='NewMenu' xmlns='http://foo' onload='GetPosition( evt )'>
<header>Custom Menu</header>
<item action='ZoomIn'>Zoom &In</item>
<item action='ZoomOut'>Zoom &Out</item>
<item action='OriginalView'>&Original View</item>
<separator />
<item onactivate='MyFunction()'>&My Function</item>
<menu>
<header>Submenu</header>
<item onactivate="alert('Item1')">Item1</item>
<item onactivate="alert('Item2')">Item2</item>
<item onactivate="alert('Item3')">Item3</item>
</menu>
<separator />
<item xmlns='http://www.w3.org/1999/xlink' xlink:href='inserted_link.html' target='resource window'>Menu Link...</item>
<separator />
<item action='Quality'>Higher &Quality</item>
<item action='Pause'>&Pause</item>
<item action='Mute'>&Mute</item>
<separator />
<item action='Find'>&Find...</item>
<item action='FindAgain'>Find &Again</item>
<separator />
<item action='CopySVG'>&Copy SVG</item>
<item action='ViewSVG'>&View SVG...</item>
<item action='ViewSource'>View Sourc&e...</item>
<item action='SaveAs'>&Save SVG As...</item>
<item action='SaveSnapshotAs'>Sa&ve Current State...</item>
<separator />
<item action='Help'>&Help...</item>
<item action='About'>About SVG Viewer...</item>
</menu>
</defs>

Handling CGM Application Data

The following information defines how Quick.SVG 2005 handles different types of CGM application data, which is data that cannot or is not normally handled in SVG.

Handling Application Structure And Link Data

Virtually all popular CGM generation tools utilize the application structure element to maintain, at the very least, minor metadata. Often, critical functionality regarding dynamic behavior is contained here for use by custom viewers and workflows. For this reason, the Quick.SVG 2005 conversion engine attempts to maintain as much application structure data within the SVG as possible, by storing this "metadata" in an extended namespace within each converted SVG. You can write your own XSLTs to handle this data in the SVG accordingly by placing the XSLTs in the "filters" directory located in the Quick.SVG application directory. You can also visit DocSoft's User Forums for possible useful external XSLT examples.

The CGM metadata is formatted within the SVG as follows:

When a "begin application structure" element within a CGM is encountered, a group is created to house any child elements. The following example demonstrates how the data is placed in the converted SVG:

<g id="application structure name" qsvg:type="application structure type">
     …
</g>

In the above example, the "application structure name" and "application structure type" are the first and second parameters, respectively, of an exported metadata set (CGM element: class 0, element 21).

The close group tag is appended at the "end application structure" CGM element (class 0, element 23).

Typically, within the application structure delimiters group, a class 9 application structure element will occur. For example, in the event of a WebCGM link, we would see the following:

<g id="firstObject" qsvg:type="grobject">
<qsvg:aps qsvg:type="linkuri" qsvg:link="http://www.cgmopen.org" qsvg:behavior="" qsvg:title="" />
     
<rect x="1554" y="4525" width="2263px" height="1845px" stroke="Black" stroke-width="154px" fill="#FF0000" />
</g>

It is important to study these objects by viewing the source code of the exported SVG. With some moderate XSLT knowledge, it is fairly simple to write an XSLT to handle these metadata however you require in the converted SVG.

The linking.xslt stylesheet provided with the Quick.SVG 2005 installation is capable of converting the above example into SVG links. XLink is utilized and a standard "a" link will be created as a parent of the group. This stylesheet will prove as a valuable reference for designing related stylesheets on your own. While this XSLT is not robust enough to handle all application data links, it can be modified and accompanied with JavaScript to handle your specific link requirements. You may also visit Quick.SVG 2005 Plugins, Add-ons & SDK Forum for assistance with XSLT development. DocSoft also provides professional XSLT consulting for moderate to complex XSLTs.

Handling Multiple Pictures Within CGM Documents

CGMs can have multiple layers or "pictures" within a single CGM. With Quick.SVG's handling of metadata, you can capture the data for proper handling in your exported SVG. The conversion engine maintains each picture inside an SVG group (<g/>) with an attribute in a “qsvg" namespace, qsvg:picture. The qsvg:picture attribute maintains metadata information from the picture descriptor in the CGM. This is most often a layer name.

For example:

<g qsvg:picture="dynamic.cgm:type:overlay">
     <rect width="000px" height="100px" fill="#000000"/>
</g>

For easier programmatic access to the individual layers, there is the pagination xml style sheet, located at the Quick.SVG 2005 Plugins, Add-ons & SDK Forum for free download for your modification. This filter, pagination.xslt, adds a numerical locater to each picture in the form of a progressive ID tag. The above example would be as follows post transformation:

<g id="p1" qsvg:picture="dynamic.cgm:type:overlay">
     <rect width="000px" height="100px" fill="#000000"/>
</g>

Naming convention is "p + count" where the range of ID’s for n pictures would be “p1" through “pn".

The picture p2, for example, could be selected via the DOM as follows:

DocumentElement.getElementById(“p2")

If utilizing XSL, pictures would be captured by a template as follows:

<xsl:template match="svg:g[attribute::qsvg:picture]">
     …
</xsl:template>

Developers are invited to utilize the existing XSLTs for reference. You may also visit the Quick.SVG 2005 User Forums for additional questions and answers regarding this or any other Quick.SVG questions.

Quick.Start Guide

Quick.SVG 2005 provides a simple and intuitive interface to convert your CGMs to pure SVG. Operating the software is also easy. The capability to save workspace settings for continued and future use, batch processing, and viewing make your conversion as painless as possibl