Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

Problem relink Image - CORBA

$
0
0
Hallo!

My CS3 Document contains one Rectangle with one Image.
Now I want to change the Image via CS3 Server Java / CORBA Plugin.
After running the code, InD changes the Link, but i can't see the new
image in the Rectangle.
One information for the following Source-Code:
the method startServer initialize the InD-Session and returns the
opened Document as Object of Type Document.
Here is the code:

startServer();
Rectangle ra = doc.getNthChildRectangle(0);
int recId = ra.getId();
Image image = ra.getNthChildImage(0);
int imgId = image.getId();
Link link = image.getItemLink();
int linkId = link.getId();
System.out.println("RectAngleID: " + recId);
System.out.println("ImageID: " + imgId);
System.out.println("LinkID: "+linkId);
link.relink("/Users/fklaes/Downloads/1.jpg");
link.update();
linkId = link.getId();
System.out.println("LinkID: " + linkId);
imgId = image.getId();
System.out.println("ImageID: " + imgId);
recId = ra.getId();
System.out.println("RectAngleID: " + recId);

doc.save(OptArg.noFile(),
OptArg.noBoolean(),
OptArg.noString(),
OptArg.noBoolean());
stopServer();
<-- This lines you can see in the console -->

RectAngleID: 198
ImageID: 319
LinkID: 320
LinkID: 0
ImageID: 0
RectAngleID: 198

I don't know what's wrong in this snippet.
Thanks for your answers.

Viewing all articles
Browse latest Browse all 20709

Trending Articles