Copy link to clipboard
Copied
Hello, I have developed a JavaScript for InDesign Server CS6.
The JavaScript take the InDesign document and send it to print to a poscript printer.
Usually the script works correctly, but after some executions it appear the error message "There is a problem with the font "---------"".
At the beginning I thought that the font was corrupt but it makes no sense because if I restart the InDesign Server and launch the execution with the same document, It works correctly.
I have reviewed the script, and we are sure that the script is correct.
The documents should be correct because if I launc any document after restarting the application It works OK.
The fonts seem be OK, following the same reason that I say about the document.
So we don't know where is the problem but it is an important problem.
could someone help me?
Regards
So change that character style to not call for Small Caps but instead call for All-Caps scaled appropriately. It's the local-formatted Small Caps that are the problem, so don't use them.
Dave
Copy link to clipboard
Copied
How often do you restart the server under normal conditions? Or do you just leave it running until you have a problem? I ask because this sounds like the server getting its knickers in a twist over a period of time.
Dave
Copy link to clipboard
Copied
Well, usually I restart the server once I get the error.
The problem is that sometimes the error appears after 20 executions of the script and sometimes it happens after just 2 executions.
So I think it is not a 'temporal' issue.
David
Copy link to clipboard
Copied
These are the worst kind of problems because it's fairly clear that it is a system issue rather than a script issue.
Where are your fonts located? Is there any correlation between the fonts that cause the problem and whether they're local to InDesign Server or to the documents (e.g., in Document Fonts folders)?
Is it possible that under some circumstances, InDesign Server is closing the document before the printing has completed and this is causing a false font error report?
I am grasping at any straws that come to mind here.
Dave
Copy link to clipboard
Copied
Really we have a crazy font management.
We have more than 9000 fonts in the /Library/Fonts
To avoid conficts between the the installed system fonts and the Document font folder, we don't use the document font folder, so that we use always the /Library/Fonts/ fonts installed. Anyway some time ago we also used the Document Font folder and we got the same problem.
I think that your idea about closing the document before the printing process has been finished is very interesting. What I do is :
doc.print(print_preset);
doc.close();
But I don't how can I test if the document is being closed before finishing the printing process.
Regards
Copy link to clipboard
Copied
I had a similar circumstance recently where I was updating running heads in a long document and then handing the document off to another process which was exporting a PDF. We realized that the running heads weren't all being updated every time, and it looked as though the PDF export was being triggered before the updates had been completed. So, before the hand-off, I built-in a delay using
$.sleep(n)
where n was something like 1 millisecond for every page in the document.
You might try something like that. No guarantees of course.
Dave
Copy link to clipboard
Copied
The error follows after inserting a "$.sleep(5000)"
So it seems that this is not the error.
I added more information:
Another interesting thing that we have detected is that always (I think) It happens with documents which have small-caps with the fonts that we got the error message.
I don't understand the error. I am thinking it is just an InDesign Server bug, and there is no solution
Copy link to clipboard
Copied
Could be. Are they designed smallCaps or simulated?
Dave
Copy link to clipboard
Copied
They are simulated.....
Copy link to clipboard
Copied
In that case, you might be able to work around this fairly painlessly.
If you're using local formatting, you'll need to convert all instances to a character style.
Having done that, or if you started with a character style anyway, you can redefine the character style to do your own simulation using All-Caps and scaling percentages for both Horizontal and Vertical.
That way, the documents will still look exactly the same (assuming you use the same scaling percentage as is set in preferences) but don't call for those simulated Small Caps which seem to break InDesign Server.
Dave
Copy link to clipboard
Copied
It seemed a good idea, but In the last example that I review all the small caps are in a character style ...
Copy link to clipboard
Copied
So change that character style to not call for Small Caps but instead call for All-Caps scaled appropriately. It's the local-formatted Small Caps that are the problem, so don't use them.
Dave
Copy link to clipboard
Copied
It is working!!! thank you very much.!!
Copy link to clipboard
Copied
Thank you very much again Dave!
Just one more question to clarify. Can we say that this behavior is a bug of InDesign Server? A wrong use of the fonts? Both?
Regards
Copy link to clipboard
Copied
Yes, I believe this is an InDesign Server bug. It might not be just Server. A faint bell of recognition is ringing in my head that this has been an issue for years. That's why I was able to suggest the workaround the moment you mentioned SmallCaps.
Dave
Copy link to clipboard
Copied
Another interesting thing that we have detected is that always (I think) It happens with documents which have small-caps with the fonts that we got the error message.