Skip to main content
Participant
August 12, 2024
Question

Document Generation API. The support of bidirectional texts

  • August 12, 2024
  • 1 reply
  • 178 views

When using the "Document Generation API", I encountered a problem where Hebrew text along with English words is converted to PDF with unexpected results.
The "Document Generation API" documentation does not state that it is currently optimized for English-language content, as the "PDF Extract API" documentation does. But in practice, it looks like the "Document Generation API" is not optimized for non-English content, particularly for RTL cultures.
I noticed in the documentation that this API supports using some HTML tags for text formatting. I tried adding the 'dir="rtl"' attribute to indicate the writing direction but with no luck. Is there any solution or a workaround to correctly convert bidirectional text to PDF with the "Document Generation API"?

    This topic has been closed for replies.

    1 reply

    Participant
    August 13, 2024
    I had found a workaround.
    The Acrobat Services API works fine with the UAX #9: Unicode Bidirectional Algorithm. JSON file must contain text with characters that define the writing direction of a particular text block (\u202C, \u202B, etc.)