Skip to main content
1-Visitor
November 12, 2010
Question

PE Publishing from a Java Servlet

  • November 12, 2010
  • 3 replies
  • 1007 views

I have built a Java servlet, running in Tomcat 7 which reads an XML instance from a third party repository and sends a publishing request (PDF) to a PE SErver (v. 5.4). The PDF is streamed back to the client browser. This part is working just fine, what I can't figure out is how to send the graphics which are linked in the instance via an 'image' element with a URL attribute.

I have tried writing the graphics to the file-system and re-linking them in teh servlet, but this didn't work. I have opened the resulting XML instance in Arbortext Editor 5.4 and published it successfully with graphics on the PE server.

It seems that I'm missing something in passing the graphics or correctly linking them for transmission to the PE server. Has anyone had any success doing this?

    3 replies

    1-Visitor
    November 13, 2010
    Try writing them to a directory to which PE has access and has had
    configured in its graphics path ... the graphics folder of PE's custom
    folder is the simplest location in one sense. (I forget how folder-deeply PE
    will search, but the custom folder help should say.)

    1-Visitor
    November 13, 2010
    Thanks Paul, That did the trick. I knew I was really close, case closed!
    1-Visitor
    November 15, 2010
    There is also the graphics PI trick for XSL-FO that will sometimes get you around having to move the graphics:

    </fo:external-graphic>

    <xsl:copy-of select="following-sibling:Smiley Tonguerocessing-instruction('Pub')[contains(.,'_graphic_data')]"/">
    </fo:block>

    John T. Jarrett CDT
    Senior Tech Writer, Integrated Logistics Support, Land & Armaments/Global Tactical Systems

    T 832.673.2147 | M 832.363.7234 | F 832.673.2376 | x1147 | -<">mailto:->
    BAE Systems, 5000 I-10 West, Sealy, Texas USA 77474
    www.baesystems.com