🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.indesign.windows
Article #51

InDesign CS4 & IDML & Copy & Paste Bug

#51
From: Bjoern_Sonntag
Date: Thu, 02 Apr 2009 16:21
95 lines
4501 bytes
Hello,

have build an InDesign CS 4 document with javascript; like this

//HelloWorld.jsx
//Create a new document.
var myDocument = app.documents.add();
//Get a reference to the first page.
var myPage = myDocument.pages.item(0);
//Create a text frame.
var myHelloTextFrame = myPage.textFrames.add();
//Specify the size and shape of the text frame.
myHelloTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
//Enter text in the text frame.
myHelloTextFrame.contents = "Hello World!";
var myStory = myHelloTextFrame.parentStory;
myStory.trackChanges=true;
myStory.insertLabel("innerText1","dbkey2211");

var myInnerTextFrame = myPage.textFrames.add();
//Specify the size and shape of the text frame.
myInnerTextFrame.geometricBounds = ["6p0", "30p0", "18p0", "42p0"];
//Enter text in the text frame.
myInnerTextFrame.contents = "ziemlich sinnfreier Text";
var myInnerStory = myInnerTextFrame.parentStory;
myInnerStory.trackChanges=true;
myInnerStory.insertLabel("innerText2","dbkey3322");

//Save the document (fill in a valid file path).
var myFile = new File("/c/HelloWorld.indd");
var result = "saved to: " + myFile.fullName;
if(!myFile.parent.exists && !myFile.parent.create()) {
	result = "Not saved. Unable to create the folder: " + myFile.parent.fullName;
} else {
	myDocument = myDocument.save(myFile);
}
//Close the document.
myDocument.close();

result;

so i get the "HelloWorld.indd" file ... so far so good. Now i load this in InDesign and export it as IDML.

I get for example this story

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="6.0">
	<Story Self="ue0" AppliedTOCStyle="n" TrackChanges="true" StoryTitle="$ID/" AppliedNamedGrid="n">
		<Properties>
			
				<KeyValuePair Key="innerText2" Value="dbkey3322"/>
			
		</Properties>
		<StoryPreference OpticalMarginAlignment="false" OpticalMarginSize="12" FrameType="TextFrameType" StoryOrientation="Horizontal" StoryDirection="LeftToRightDirection"/>
		<InCopyExportOption IncludeGraphicProxies="true" IncludeAllResources="false"/>
		<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/NormalParagraphStyle">
			<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
				<Content>ziemlich sinnfreier Text</Content>
			</CharacterStyleRange>
		</ParagraphStyleRange>
	</Story>
</idPkg:Story>

so far so good ... now i package them with "package -c HelloWorld Hello.idml" and load this document in InDesign ...

at following i do some copy & paste actions and export the result to IDML and get this story ...

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="6.0">
	<Story Self="u186" AppliedTOCStyle="n" TrackChanges="false" StoryTitle="$ID/" AppliedNamedGrid="n">
		<StoryPreference OpticalMarginAlignment="false" OpticalMarginSize="12" FrameType="TextFrameType" StoryOrientation="Horizontal" StoryDirection="LeftToRightDirection"/>
		<InCopyExportOption IncludeGraphicProxies="true" IncludeAllResources="false"/>
		<XMLElement Self="di3i8" MarkupTag="XMLTag/Root" XMLContent="u186">
			<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/NormalParagraphStyle">
				<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]">
					<Content>ziemlich sinnfreier Text</Content>
				</CharacterStyleRange>
			</ParagraphStyleRange>
		</XMLElement>
	</Story>
</idPkg:Story>

what the hell ... and find 2 differences

TrackChanges="false" <--- in the original this was true

and the label has lost.

<Properties>
   
	<KeyValuePair Key="innerText2" Value="dbkey3322"/>
   
</Properties>

so i think InDesign CS 4 have a bug in the copy and paste facility; only the content will be copied but all additional infos are lo
Technical Details
Message-ID: <59b87b7a.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f51c6,153c1eab05fb2ef4,start
X-Google-Attributes: gidf51c6,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bjoern_Sonntag@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.indesign.windows
Subject: InDesign CS4 & IDML & Copy & Paste Bug
Message-ID: <59b87b7a.-1@webcrossing.la2eafNXanI>
Date: Thu, 2 Apr 2009 09:21:50 -0700
Lines: 114
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit