Copy link to clipboard
Copied
I'm using Javascript to generate pdf files with repetitive metadata, such as subject/description. I'm doing this by importing as xmp file as data object and replacing certain words or strings, then assigning the result to doc.metadata. I have been doing it this way for 4-5 years.
I currently have a longish description that used to be accepted whole before and now gets cut off. This happens somewhow *after* I save the file.
docNew.metadata = xmpContents; //string from xmp file
var sTitle = "Some title";
docNew.info.Title = sTitle;
docNew.saveAs (...)
console.println(docNew.metadata);
Console shows me that after saving the file and before closing it, subject/description is complete, but when I close and open it again, it is cut off. The same thing happens when I paste the value manually in Document Properties.
Has some char limit been introduced regarding subject/description length?
Thank you for your help!
Copy link to clipboard
Copied
Well, it turns out that two characters - ɣ and ɤ - are responsible for this, though I don't know how. The text always cuts off after the same number of characters, and that's nowhere near these two, it's just the fact that they are there, which seems to cause the problem. Tried various ways of passing char codes instead, but everything results in truncation. Is there a way to pass a string containing non-ASCII to subject/description that won't cut off my text?