Steve Valaitis wrote:
> XmlEditor seems to do everything else, so does anyone know if there is a
> way to paste an image into XmlEditor and have it referenced in your
> document? Basically something like how you can paste a screenshot into a
> Word doc. Except it would be really cool if when you pasted XmlEditor
> could call out to some external image manipulation library, and give you
> a dialog to save the image to a location, in some useful(probably
> compressed) format and immediately insert a link referencing that image.
>  
> Is this possible, and if not do the developers know if there's any
> chance of something like this getting implemented?

Cuurently, XXE has a comprehensive set of facilities for dealing with
images and graphics. We don't intend to enhance them in the near future.

--> Inserting an image:

[1] Insert a figure, screenshot, mediaobject, inlinemediaobject, etc,
element in your document.

[2] *Drag&drop* the image you want to insert, from your favorite file
manager (e.g. Konqueror, Finder, etc), onto the imagedata element
(displayed as an ``empty image icon'').

After doing that, a dialog box is displayed which allows you to copy or
to reference the dropped image. Of course, this dialog box also takes
care of properly updating the fileref attribute of the imagedata element.

If drag&drop does not work on your platform (Linux/Java 1.4), simply
double-click on the imagedata element.



--> External image manipulation library:

Here's an excerpt of my own ~/.xxe/addon/customize.xxe:

---
<include location="imagetoolkits.incl" />
---

where imagetoolkits.incl contains definitions such as:

---
  <imageToolkit name="Ghostscript">
    <description>Converts EPS and PDF graphics to PNG.
Important: requires Ghostscript 8+.</description>

    <converter>
      <input extensions="eps epsf ps pdf" magicStrings="%!PS %PDF"/>
      <output extensions="png"/>

      <shell command='gs -q -dBATCH -dNOPAUSE -sDEVICE=png16m
                      -r96 -dTextAlphaBits=4
                      -dGraphicsAlphaBits=4 -dEPSCrop
                      %A "-sOutputFile=%O" "%I"'
             platform="Unix"/>

      <shell command='gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=png16m
                      -r96 -dTextAlphaBits=4
                      -dGraphicsAlphaBits=4 -dEPSCrop
                      %A "-sOutputFile=%O" "%I"'
             platform="Windows"/>
    </converter>
  </imageToolkit>
---

Such definition of a custom image toolkit plug-in allows me to insert
EPS and PDF images in my XML documents. More info. in
http://www.xmlmind.com/xmleditor/_distrib/doc/configure/imageToolkit.html.

Plus, using simple macros, it is pretty easy to invoke external image
viewers/editors within XXE. For example:

---
  <command name="docb.startImageViewer">
    <macro>
      <sequence>
        <get context="$implicitElement/@fileref"
             expression="uri-to-file-name(resolve-uri(.))" />
        <command name="start" parameter='xv "%_"' />
      </sequence>
    </macro>
  </command>
---

-------------- next part --------------
A non-text attachment was scrubbed...
Name: imagetoolkits.incl
Type: text/xml
Size: 4971 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20051110/ee37adec/attachment.xml
 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: texmathtoimg
Url: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20051110/ee37adec/attachment.bat
 

Reply via email to