Thought I’d pass this on as a “lesson learned†in case it might be valuable to others.
I was having a problem with an API Integration guide I was working on where very long character strings (URLs demonstrating the format needed by developers) were not wrapping properly in the PDF versions of the generated output. The web help versions looked fine as the browsers wrapped the URLs nicely but in the PDFs, the URLs ran off the edge of the page like this…
I couldn’t fix this myself and couldn’t find anything in the forums either so I ended up calling Madcap’s technical support and spoke with Alvaro. After researching the issue, he found that the problem was the XHTML source files and CSS used by Flare didn’t support the wrapping of long character strings like this in PDFs. Web help looks fine because they wrap properly in that format but for PDFs, this issue remains.
As a work-around, therefore, he suggested creating two copies of the same extra-long character strings. Condition one copy for Print and one for Webhelp. Leave the Webhelp version alone as it’ll display properly in a browser but in the Print version, switch the Layout in Flare’s XML Editor to Print and then insert manual line breaks (Shift-Enter, not Enter) to force the string to wrap. By switching the Layout to Print, you can see the margins which will help you figure out where to put the line breaks.
Here’s what it looks like (in Print Layout)…
Maybe not the most elegant solution but it works and credit should go to Alvara for figuring it out.
Lesson Learned: Wrapping Long Character Strings In PDFs
-
pcalnan
- Propeller Head
- Posts: 67
- Joined: Tue Jul 17, 2007 8:30 am
- Location: Ottawa, Ontario
- Contact:
Lesson Learned: Wrapping Long Character Strings In PDFs
You do not have the required permissions to view the files attached to this post.
Patrick Calnan
Re: Lesson Learned: Wrapping Long Character Strings In PDFs
If you haven't already, you might want to add a print-only comment before the URLs letting the user know that line breaks were added just for readability, but the URLs themselves are one long string, or something to that effect.
BTW, have you tried copying-and-pasting from the PDF into a browser to see if it ignores the line breaks and pastes the URL as one long string? If it doesn't, you might either also add a note about that or recommend that users copy the URL from the online help instead. Otherwise your support guys might get calls asking why the URL in the PDF doesn't work (the user may not realize the entire string isn't being pasted).
BTW, have you tried copying-and-pasting from the PDF into a browser to see if it ignores the line breaks and pastes the URL as one long string? If it doesn't, you might either also add a note about that or recommend that users copy the URL from the online help instead. Otherwise your support guys might get calls asking why the URL in the PDF doesn't work (the user may not realize the entire string isn't being pasted).
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.