So I just upgraded us from Fop v. 0.20.5 to v 0.95 because our old version
of the software was not properly handling newer svg image specifications.
In the previous version we had to overload the PDFTranscoder class in order
to allow us to custom specify the x,y position of an SVG image on the pdf
page. 

 

So I guess the first question would be, is it now possible to set the x,y
position of a svg image within a document with v 0.95?  I haven't seen
anything in the documentation anywhere to indicate that it is, but it would
make life much nicer if so.

 

Next question, assuming the answer to the first question is no:  Our old
overload of the PDFTranscoder class used a PDFGraphics2D object,
instantiated with the now-"protected" PDFGraphics2D(Boolean textAsShapes)
constructor.  I have tried to change over to the new many-argument
constructor however in creating a new document to send through I end up
getting a blank page back.  Is there a way to access the protected
constructor (or equivalent functionality) somehow?

 

Lastly, we have a PDFObject class that makes use of several different
filters.  Since all the code was the same for each filter, I'll just show
one example from the switch statement:



The old code looked like this:

      case FILTER_FLATE:

         FlateFilter ff = new FlateFilter();

         this.streamContent = ff.encode(this.streamContent);

         PDFEntry flate = new PDFEntry("/Filter","/FlateDecode");

         dictionary.add(flate);

         break;

 

The old encode() method took a byte array and returned a byte array; however
that method no longer exists.  It appears that the replacement functionality
is "applyFilter" which takes an OutputStream and returns an OutputStream.  I
replaced the above code with the following, but am unsure if this is the
correct way to handle the situation.  The goal here is to avoid breaking any
more code than strictly necessary to perform this upgrade


      case FILTER_FLATE:

         FlateFilter ff = new FlateFilter();

         this.streamContent = ((FlateEncodeOutputStream)
ff.applyFilter(out)).toString().getBytes();

         PDFEntry flate = new PDFEntry("/Filter","/FlateDecode");

         dictionary.add(flate);

         break;

 

I sincerely appreciate any assistance you can offer,

___________________________________________________
Brian Trezise
Staff Software Engineer
IntelliData, Inc
3173 s. uravan way
aurora, colorado 80013
T: 720.524.4864
[EMAIL PROTECTED]

 

Reply via email to