In InDesign (CS5) I have a TextFrame what I need to export to JPG, but when the text is overset (property overflows is true), the exported JPG only has the visible area of the textframe, instead of the whole content. How to solve this problem?
Here's an example code that reproduces this behaviour:
var app:com.adobe.indesign.Application = InDesign.app; var page:Page = app.activeDocument.pages.firstItem(); var tf:TextFrame = page.textFrames.add(); tf.geometricBounds = [50, 50, 100, 200]; tf.contents = "line1 \n line2 \n line3 \n line4 \n line5 \n line6"; tf.exportFile(ExportFormat.jpg, new File("/tmp/tf.jpg"));
After running the code, the file "tf.jpg" will only contain the first 3 lines, like the image below.
Well, isn't it obvious that you will only get the text frame when you export that to an image? Non-visible content is, well, not visible…
If you want more content, you will have to make your text frame bigger…
Well, not quite, considering that I am using an API do manipulate it. Anyway, I may have had the wrong expectation.