PDF Output Contains Added Spaces

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
Christina_E
Jr. Propeller Head
Posts: 4
Joined: Wed Jul 29, 2015 8:42 am

PDF Output Contains Added Spaces

Post by Christina_E »

Notes:
  • A ticket has already been logged for this issue with the Flare Development team (#117014) -- however, I'm looking for any and all creative workarounds pending a MadCap solution.
  • At MadWorld 2016, I had some help from some true Flare experts, but none of the proposed solutions have worked to date (listed below).
  • Thanks in advance!
Issue:
Our Guides in PDF format rely heavily on customers being able to copy and paste lengthy installation and configuration code scripts. Lengthy = wrapped onto three (3) or more lines. (I use a custom style for these scripts; however, I've established that the style used has no bearing on the issue.) When you copy the lines of code from the PDF output to a command prompt (or to a text editor such as Notepad or Wordpad), the following occurs:
  • Wherever the lines break in the PDF, spaces are added to the code text; and
  • If a line breaks immediately following a dash (-) in the code text, the dash is interpreted as a hyphen and is removed.
In other words, the conversion to PDF breaks the code. Because the code scripts that span more than one line cannot be copied and pasted into a command console reliably, these code scripts are rendered ineffective.

This issue is not limited to Flare -- same thing occurs when you convert the same text from Word, or Notepad, to PDF.

At this point, my only solution is to have customers copy each code script into a text editor to manually edit the text (removing the extra spaces, adding the dashes back in, etc.), check for any other wonky formatting issues, and then copy the revised code script into the command console. Not a satisfactory solution, even in the short term.

Solutions that unfortunately did not yield success:
  • Convert each code script into a URL with an empty landing location, courtesy of doc_guy (bonus points for creativity!).
  • Make each code script a live link to a landing location where customers can copy the correct, unbroken code (would have worked, but not practical).
Ideas? PATY!
ChoccieMuffin
Senior Propellus Maximus
Posts: 2634
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: PDF Output Contains Added Spaces

Post by ChoccieMuffin »

Not sure if this is of any use at all, but I seem to remember that if you are typing code and press Return but want the code to follow on you have to put an underscore at the end of the line, so you'd have

Imagine this is a very long line of code that wraps onto two lines in some editors

would work if you type

Imagine this is a very long line of co_
de that wraps onto two lines in some editors


So could you type your code with the underscores with Returns at the end of the line?

I'm just clutching at straws for you, and it might be a complete load of rubbish, in which case just ignore this post and wait for someone who knows what they're talking about to come along. (It's been a VERY long day so far and it's still not over.)

:)
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply