<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using ContentReader for transformation in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299653#M252783</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SOAP is required by the OCR server–short of writing windows to the windows COM API, it is the only way to programmatically process a file.&amp;nbsp; All the methods for generating base64 encoding seem to need me to step through a byte array.&amp;nbsp; When I run the .getContentString() method, what encoding is alfresco using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Sep 2014 15:45:08 GMT</pubDate>
    <dc:creator>abruzzi</dc:creator>
    <dc:date>2014-09-08T15:45:08Z</dc:date>
    <item>
      <title>Using ContentReader for transformation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299651#M252781</link>
      <description>A number of years ago (v3.1.2) I integrated our OCR server (Abbyy Recognition Server) with Alfresco.&amp;nbsp; The integration was a quick hack that I wrote.&amp;nbsp; Basically it used a PHP script to make the SOAP call to the OCR server, and the PHP was called by a RuntimeExec bean.Now I'm trying to significantly b</description>
      <pubDate>Thu, 04 Sep 2014 16:42:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299651#M252781</guid>
      <dc:creator>abruzzi</dc:creator>
      <dc:date>2014-09-04T16:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using ContentReader for transformation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299652#M252782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The difference is down to content encoding.&amp;nbsp;&amp;nbsp; You are converting character encodings too much.&amp;nbsp; FileStr will be a java string.&amp;nbsp;&amp;nbsp; You then convert that to us-ASCII&amp;nbsp; bytes. ( which may not handle all chars ) And then you base 64 encode that ASCII stream.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But why use soap at all?&amp;nbsp;&amp;nbsp; Use cmis or web scripts instead.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 18:44:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299652#M252782</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-09-04T18:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using ContentReader for transformation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299653#M252783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;SOAP is required by the OCR server–short of writing windows to the windows COM API, it is the only way to programmatically process a file.&amp;nbsp; All the methods for generating base64 encoding seem to need me to step through a byte array.&amp;nbsp; When I run the .getContentString() method, what encoding is alfresco using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 15:45:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299653#M252783</guid>
      <dc:creator>abruzzi</dc:creator>
      <dc:date>2014-09-08T15:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using ContentReader for transformation</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299654#M252784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;When content is uploaded into alfresco ,alfresco will try to guess the encoding of it(the default encoding is UTF-8). After that the encoding will be used to in getContentString() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can call getContentInputStream instead of getCotentString,and convert it to byte arry,then encode the byte arry using base64 encoder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // read from the stream into a byte[]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InputStream is = getContentInputStream();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ByteArrayOutputStream os = new ByteArrayOutputStream();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org.springframework.util.FileCopyUtils.copy(is, os);&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] bytes = os.toByteArray();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//encode it using base64 encoder.&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 02:15:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/using-contentreader-for-transformation/m-p/299654#M252784</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2014-09-09T02:15:18Z</dc:date>
    </item>
  </channel>
</rss>

