Article View: adobe.scripting.indesign
Article #15922Re: Missing images on XML import
From: Olav_Kvern
Date: Tue, 04 Nov 2003 16:25
Date: Tue, 04 Nov 2003 16:25
29 lines
3444 bytes
3444 bytes
Aigars--
re: "About the missing images. The XML doesn't contain any image references (href's) at all. They're all in the document. The XML was first produced by InDesign itself (using the XML export). After the XML has been changed externally, the idea is to import it back. Is there a way to include image references in the exported XML?"
Is it possible that the images did not get tagged with an XML tag/element in the first place?
re: "Another thing is that I don't have access to the original images any longer, i.e. all the image links would break if I tried to update/relink/unlink/etc them. If this meant that all the images would get lost on XML import I'd guess that that was the main reason. But it's not like that. Some images are still there."
If your images have been embedded (i.e., stored inside the document), then the ones that *didn't* get tagged will still appear. Unless you've specifically embedded them, however, they are stored externally--this is the default behavior. If the images were embedded, the images that were tagged will not appear on XML import, because the original file is gone.
When graphics are stored externally, you'll still sometimes see the screen preview of the image when the original linked graphic has been lost.
re: "I'd like to use the method you actually seem to prefer, i.e. placing the images once more. The problem with that is, as mentioned above, is that I don't have the original images available and don't seem to find a way of tricking InDesign to accept broken links."
The link of the image will still have the file path to the original, even if the image has been embedded. But if the graphic isn't there, there's no way to place it.
re: "Haha, with "lacking" COM support I actually primarily mean that the documentation for VB (is there any else that could be used?) isn't 100% (some things missing, like XMLElement.untagElement, others badly documented, like Rectangle.Move), but secondly and most importantly I mean that calling certain (legal) COM calls, in certain order, can make InDesign do anything from crash to freeze. Don't get me wrong, I don't think the COM support is truly bad, it's just isn't, IMHE perfect."
Sorry about that--the XML documentation is a weak point of the 2.0 Scripting Guide because the XML features were not complete when the 2.0 version of InDesign shipped. What are some examples that cause a crash?
Rectangle.Move changed between 1.5x and 2.0 and I didn't catch the difference (you can't refer to method parameters using ":=" in 2.x). The way it works is that the Move method has two parameters moveTo and moveBy. If you want to get moveBy, you need to leave the moveTo parameter empty, as in:
myRectangle.Move , Array("3p", "3p")
Hope this helps!
Thanks,
Ole
Technical Details
Message-ID:
<2cce25cc.2@webx.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webxReferences:
<2cce25cc.-1@webx.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,c928bd7670cd395b X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-11-04 08:38:08 PST From: Olav_Kvern@adobeforums.com Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!webx Newsgroups: adobe.scripting.indesign Subject: Re: Missing images on XML import Message-ID: <2cce25cc.2@webx.la2eafNXanI> Date: Tue, 4 Nov 2003 08:25:51 -0800 References: <2cce25cc.-1@webx.la2eafNXanI> Lines: 58 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit