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

IDS CS4: Check for neccessary update of image links

$
0
0

Operating System Windows.

IndesignServer CS4.

Problem:

IDS checks links to images if the source file was modifies.

It seems that checks are made on the modification date and the size of the file.

If the file was modified, then IDS shows a grey rectangle instead of the image.

There is also a method in the JAVA-API for IDS to check the link status: link.getStatus() == kLinkStatusLinkOutOfDate.value.

But this only works if the new modification date is after the link.getDate() value.

But when the new modification date is before the link.getDate() value, the check link.getStatus() delivers kLinkStatusNormal.value

and IDS shows a grey rectangle and there is no way (as far as i know) to check with the JAVA-API for IDS that i have to call link.update() so the image is shown correctly.

 

For Example

An image link in an ID-document points to following file

     Path: c:/test.jpg

     Modification date: 01.May.2008 10:00:00

     File size: 1.5 MB

And the creation date (link.getdate()) of the link is 15.February.2009 09:00:00

Now we check the link object:

     link.getDate() == 15.February.2009 09:00:00

     link.getSize() == 1.5 MB

     link.getStatus() == kLinkStatusNormal.value

 

Now we make a backup of our original c:/test.jpg and we copy a new file to c:/test.jpg with following attributes: 

     Path: c:/test.jsp 

     Modification date: 02.April.2009 14:00:00

     File size: 0.9 MB

Now let us again check the link object:

     link.getDate() == 15.February.2009 09:00:00

     link.getSize() == 1.5 MB

     link.getStatus() == kLinkStatusLinkOutOfDate.value

So we know, we have to call link.update() that the image is rendered in the ID-document,

because link.getStatus() says it and the link.getSize() isn't the file size.

 

Now we copy the old file back to c:/test.jpg:

     Path: c:/test.jsp 

     Modification date: 01.May.2008 10:00:00

     File size: 1.5 MB

Now let us again check the link object:

     link.getDate() == 15.February.2009 09:00:00

     link.getSize() == 1.5 MB

     link.getStatus() == kLinkStatusNormal.value

In this case we do not know that we have to call link.update(), because link.getSize() is the same as file size

and link.getStatus() is kLinkStatusNormal.value.

But IDS doesn't render the image and shows a grey rectangle instead.

 

Is there any other way to check, if link.update() has to be called, so that the image is rendered?


Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>