I'm having some problems with the page.place(...) command on InDesign CS3 Server.
When I try to place a PDF on a page, it works perfectly. I can see the PDF on the document.
But when try to place a snippet file, it gives me a very strange result.
There is a frame on the document where the snippet should be placed, but it doesn't contain anything. You also cannot see it unless you select it.
I can move the frame around, but not resize it.
But when I copy and paste this frame, the newly copied frame does contain the contents from my snippet.
When I try this on my desktop version it works correct, but not on the server.
Here's the code I use:
//set measurement to pt, just to be sure myDoc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.POINTS; myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.POINTS; //place the snippet on the last page myDoc.pages.lastItem().place(new File("c:/mySnippet.inds"), [170, 400]);
I managed to solve this by using the PDF place instead of snippet, but at a later stage I will have to use snippets, so it would be great to know what I'm doing wrong.
Hmm it seems that the snippet is placed on the first page, but for some reason, the coordinates are so wrong that it ends up on one of the following pages. that's wy I cannot select it.
I attached the document, it's hard to explain.
You can see two pages, all seem empty at first sight.
When you click on the first page and do a ctrl-a to select all items, you can see that there is an item selected on the second page.
Remarkable is that if I use the same code to place a pdf, the pdf is placed at the correct position on the second page.
Is there something wrong with the coordinates when placing snippets, or am I doing something wrong?
Edit: I can't seem to reproduce this problem with a blank indesign file, which will probably make it hard for anyone to find the problem.
Must be something else in the complete script that is causing this.