This is Shin at XLsoft.
The customer is trying to output PDF from a Word document using Aspose.Words for Java.
I got five additional questions from a customer.
I’m sorry many times, can you look it up?
The source code for verification and the verification result are attached.
2020-04-15_2225.zip (1.2 MB)
1.Is there a way to get the width and height of a character in Aspose.Words?
※ Thet want to get information on the state in which fonts and character sending have been applied.
→ Sample: No sample because the API is unknown
※ The intended result is not always returned.
→ Sample: ApplyTextScalingWithFixedWidth (Sample that applies horizontal ratio to the character string. It was set to fit within the width of the text box)
2.Is there a way to detect overflow (character overflow, character break at frame edge) in the text box?
※ They want to detect when the text box is full of characters.
When multiple text boxes are linked, the overflowing characters will be poured into the next text box, so they think that there is at least an internal judgment mechanism.
→ Sample: WdCheckOverflow (text box that overflows)
→ Execution result: WdCheckOverflowOutput1.pdf
3.If a text box is placed and TextBoxWrapMode.NONE is specified, the width of the Shape will be automatically expanded up to “Page width-Total left and right margins”.
However, if the characters do not fit within that width, they are wrapped.
Is there a way to prevent it from wrapping if it doesn’t fit?
→ Sample: WdApplyTextWrap (sample for loopback settings)
→ Execution result: WdApplyTextWrapOutput2.pdf
4.When a character string is placed with ShapeType.TEXT_PLAIN_TEXT, some characters are not output. Is there a workaround? Is it possible to detect characters that are not output?
At this time, it is output when the character string is output with Full-width “$ = ~ |” and ShapeType.TEXT_BOX.
Is there any limitation for ShapeType.TEXT_PLAIN_TEXT?
※ Characters other than the above may not be output depending on the specified font.
However, even that font is output as ShapeType.TEXT_BOX.
→ Sample: WdOutlineText
→ Execution result: WdOutlineTextOutput1.pdf
5.Place a text box with ShapeType.TEXT_BOX and make the text vertical. When horizontal ratio is applied, only full-width characters are rotated. Is there a workaround?
→ Sample: WdApplyTextOrientation (output result of process2)
→ Execution result: WdApplyTextOrientationOutput2.pdf
For vertical writing, can they set the ratio vertically?
Please continue to help us.
Best regards, Shin