cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

PE Publishing from a Java Servlet

ptc-953456
1-Visitor

PE Publishing from a Java Servlet

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 3

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.)

Thanks Paul, That did the trick. I knew I was really close, case closed!

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
Announcements

Top Tags