[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: rasterize on server
From:       Bruce Rindahl <rindahl () lrcwe ! com>
Date:       2008-06-24 15:53:40
Message-ID: 48611884.5050602 () lrcwe ! com
[Download RAW message or body]

Cameron
Thanks for the help!  It now compiles.  Do you have a good link on how 
to add this servlet to my tomcat installation?  Do I need to add the 
Batik lib directory?
Thanks!
Bruce

Cameron McCormack wrote:
> Hi Bruce.
>
> Bruce Rindahl:
>   
>> I am trying to do something similar as described below but using the  
>> PDFTranscoder.  I modified the code as follows:
>>     
> …
>   
>>        TranscoderInput input = new TranscoderInput(request);
>>     
> …
>   
>> TranscodingServlet.java:24 cannot find symbol
>> symbol   :   construction  
>> TranscoderInput(javax.servlet.htto.HttpServletRequest)
>> location : class org.apache.batik.transcoder.TranscoderInput
>>    TranscoderInput input = new TranscoderInput(request);
>>     
>
> The TranscoderInput constructor needs to take a Reader (or Document,
> InputStream, String or XMLReader):
>
>   http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/transcoder/TranscoderInput.html
>
> You can get a Reader from the HttpServletRequest object:
>
>   http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html
>
> So you need to write:
>
>   TranscoderInput input = new TranscoderInput(request.getReader());
>
>   


[Attachment #3 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Cameron<br>
Thanks for the help!  It now compiles.  Do you have a good link on how
to add this servlet to my tomcat installation?  Do I need to add the
Batik lib directory?<br>
Thanks!<br>
Bruce<br>
<br>
Cameron McCormack wrote:
<blockquote cite="mid:20080624112116.GA3272@arc.mcc.id.au" type="cite">
  <pre wrap="">Hi Bruce.

Bruce Rindahl:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I am trying to do something similar as described below but using the \
 PDFTranscoder.  I modified the code as follows:
    </pre>
  </blockquote>
  <pre wrap=""><!---->…
  </pre>
  <blockquote type="cite">
    <pre wrap="">       TranscoderInput input = new TranscoderInput(request);
    </pre>
  </blockquote>
  <pre wrap=""><!---->…
  </pre>
  <blockquote type="cite">
    <pre wrap="">TranscodingServlet.java:24 cannot find symbol
symbol   :   construction  
TranscoderInput(javax.servlet.htto.HttpServletRequest)
location : class org.apache.batik.transcoder.TranscoderInput
   TranscoderInput input = new TranscoderInput(request);
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The TranscoderInput constructor needs to take a Reader (or Document,
InputStream, String or XMLReader):

  <a class="moz-txt-link-freetext" \
href="http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/transcoder/Transcod \
erInput.html">http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/transcoder/TranscoderInput.html</a>


You can get a Reader from the HttpServletRequest object:

  <a class="moz-txt-link-freetext" \
href="http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html \
">http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html</a>


So you need to write:

  TranscoderInput input = new TranscoderInput(request.getReader());

  </pre>
</blockquote>
<br>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic