← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-documenters/dhis2/dhis2-docbook-docs] Rev 894: Svg docs

 

------------------------------------------------------------
revno: 894
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2-docbook-docs
timestamp: Tue 2013-12-24 16:43:09 +0100
message:
  Svg docs
modified:
  src/docbkx/en/dhis2_user_man_web_api.xml


--
lp:~dhis2-documenters/dhis2/dhis2-docbook-docs
https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs

Your team DHIS 2 developers is subscribed to branch lp:~dhis2-documenters/dhis2/dhis2-docbook-docs.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-documenters/dhis2/dhis2-docbook-docs/+edit-subscription
=== modified file 'src/docbkx/en/dhis2_user_man_web_api.xml'
--- src/docbkx/en/dhis2_user_man_web_api.xml	2013-12-23 22:28:23 +0000
+++ src/docbkx/en/dhis2_user_man_web_api.xml	2013-12-24 15:43:09 +0000
@@ -3383,19 +3383,47 @@
   <section>
     <title>SVG conversion</title>
     <para>The Web API provides a resource which can be used to convert SVG content into more widely
-      used formats such as PNG and PDF. It works by sending the SVG content as the body of a HTTP
-      request to the <emphasis role="italic">svg</emphasis> resource. Ideally this conversion should
-      happen on the client side, but not all client side technologies are capable of performing this
-      task. Currently PNG and PDF output formats are supported. An optional query parameter
-        <emphasis role="italic">filename</emphasis> can be used to specify the filename of the
-      response attachment file. Note that the file extension should be omitted. For PNG you can send
-      a <emphasis role="italic">POST</emphasis> request with the SVG content as body to the
-      following URL with Content-type <emphasis role="italic">application/xml</emphasis>.</para>
-    <screen>api/svg.png?filename=myfile</screen>
+      used formats such as PNG and PDF.Ideally this conversion should happen on the client side, but
+      not all client side technologies are capable of performing this task. Currently PNG and PDF
+      output formats are supported. The SVG content itself should passed with a <emphasis
+        role="italic">svg</emphasis> query parameter, and an optional query parameter <emphasis
+        role="italic">filename</emphasis> can be used to specify the filename of the response
+      attachment file. Note that the file extension should be omitted. For PNG you can send a
+        <emphasis role="italic">POST</emphasis> request to the following URL with Content-type
+        <emphasis role="italic">application/xml</emphasis> or
+      application/x-www-form-urlencoded.</para>
+    <screen>api/svg.png</screen>
     <para>For PDF you can send a <emphasis role="italic">POST</emphasis> request with the SVG
       content as body to the following URL with Content-type <emphasis role="italic"
-        >application/xml</emphasis>.</para>
-    <screen>api/svg.pdf?filename=myfile</screen>
+        >application/xml</emphasis> or application/x-www-form-urlencoded.</para>
+    <screen>api/svg.pdf</screen>
+    <table frame="all">
+      <title>Query parameters</title>
+      <tgroup cols="3">
+        <colspec colname="c1" colnum="1" colwidth="1.92*"/>
+        <colspec colname="c2" colnum="2" colwidth="1*"/>
+        <colspec colname="c3" colnum="3" colwidth="5.96*"/>
+        <thead>
+          <row>
+            <entry>Query parameter</entry>
+            <entry>Required</entry>
+            <entry>Description</entry>
+          </row>
+        </thead>
+        <tbody>
+          <row>
+            <entry>svg</entry>
+            <entry>Yes</entry>
+            <entry>The SVG content (not encoded)</entry>
+          </row>
+          <row>
+            <entry>filename</entry>
+            <entry>No</entry>
+            <entry>The file name for the returned attachment without file extension</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </table>
   </section>
   <section>
     <title>Person management</title>