AEM Native PDF Screen inside table overflows | Community
Skip to main content
Level 4
July 15, 2024
Solved

AEM Native PDF Screen inside table overflows

  • July 15, 2024
  • 2 replies
  • 3256 views

Hello!

 

I'm seeing some issues in our legacy dita material where <screen> tags in tables are pushing past the right margin when I publish with Native PDF. How can I ensure that these screens stay in their cells?

 

Thanks in advance!

Josh

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VivekKumar

Hi, @surbhi_maheshwari ! Any ideas on this one? I've really been spinning my wheels with these unwieldy <lines>!

 

Thank you!!

Josh


Hi Josh, I looked at your merged HTML file. Non breaking white space seems to be the problem. It is not visible so you can't see it. Can you open your source dita file in some editor which shows this characters and lets you replace by normal space character? I will check in my team in someone has a suggestion.

 

Thanks,

Vivek

2 replies

Adobe Employee
July 16, 2024

Hi Josh, 

 

Please share a sample dita file where you are facing this issue.

 

Thanks and Regards,
Surbhi Maheshwari

 

Level 4
July 17, 2024

Hi, Surbhi!

Thanks for the quick response!

Apparently I misrepresented the problem - apologies! The offending tag is actually the <lines> tag, which is a rather unique one. 

It seems like our authors are going to have to rebuild most of these, but I still would like to prevent the tag from being able to exceed the border, if possible! Unfortunately, I had to redact the text on this one, but here is what I'm working with:

and here is the output:

 

Hopefully this is enough information! The plain AEM PDF output wraps the text normally - is Native PDF able to do the same in this case?

 

As always, thank you!

Josh

 

 

Level 4
August 16, 2024

Hi Josh,

Reading the DITA specs it seems that purpose of lines is what you are seeing.

 

See https://docs.oasis-open.org/dita/v1.2/os/spec/langref/lines.html.

"The <lines> element may be used to represent dialogs or text fragments where line breaks are significant. The <lines> element is similar to <pre> in that hard line breaks are preserved, but the font style is not set to monospace, and extra spaces inside the lines are not preserved."

 

So lines doesn't seem the correct usage if you are looking for the text to wrap.

 

Thanks,

Vivek


Thanks for following up, Vivek!

 

I had visited that page while researching. It definitely does make sense to me, being that it's such an open tag.

I guess the confusion from me came from the fact that our old DITA OT (and system) and current DITA OT in AEM does force the wraps. In a way this makes sense to me as well because I don't see the use of a tag running off a page. I wonder if DITA OT forces breaks around margins despite tag instructions...?  What a...unique tag! 🙂

 

Thanks again for your help! I really appreciate it!

Josh

kautuk_sahni
Community Manager
Community Manager
August 1, 2024

@joshm19816095 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
Adobe Employee
August 16, 2024

Couple of options without troubling your writers.

  1. use CSS property line-break: anywhere Challenge with this is that it will break words also. Not sure if you will want that.
  2. Write a small JavaScript plugin in the native PDF to remove &nbsp; text for lines text and replace with normal white space. Sample JS is given here: https://stackoverflow.com/questions/34743681/how-do-you-wrap-contents-with-nbsp
Level 4
August 16, 2024

Thanks so much for your above and beyond attention to my issue! I really appreciate it, Vivek!

I will definitely look into these suggestions to help out our authors. 

 

Thanks again!

Josh