Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How do I retain the formating of code snippets?

Community Beginner ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

Our documentation group is curently using Frame 7.2 with Acrobat 9. We have documents that contain code snippets that customers can copy and paste into their code. Unfortunately, when out FrameMaker files are converted to PDF a carriage return is added to the end of any line that wraps. This introduces errors into the customer's code. Does anyone know of a workaround for this? Correcting it in the PDF is an unworkable solution due to the number and length of documents.

Views

1.5K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jun 17, 2009 Jun 17, 2009

There are no line breaks on the copied text when the "Tagged PDF" option is enabled in FM and, of course, the tag for the listing para format is included. This works for me on Framemaker 8.0p277 and Acrobat Distiller 7.1 on Windows XP. Maybe anyone can confirm this?

Best Regards,

Johannes

Votes

Translate
Advisor ,
Jun 15, 2009 Jun 15, 2009

Copy link to clipboard

Copied

Have you seen examples of PDFs from other applications where the carriage returns don't occur in wrapped lines?

As far as I know this is standard behavior for PDF copying of content.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 16, 2009 Jun 16, 2009

Copy link to clipboard

Copied

Possibly. However I'd still like to know if someone has found a workaround for the problem. In programmer's guides especially, this behavior is an actual detriment to person using the guide.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 16, 2009 Jun 16, 2009

Copy link to clipboard

Copied

There are variations between authoring applications, and as far as I know, no way of controlling this aspect. Plus, there are other factors that could adversely affect the code copied from a PDF and pasted elsewhere. For best results, I recommend embedding the code fragments as files in the PDF.

For additional information as examples, see http://www.microtype.com/ImprovePDF18.html


Shlomo Perets

MicroType, http://www.microtype.com
FrameMaker/Acrobat training & consulting * FM-to-Acrobat TimeSavers/Assistants
Template Design, Single Sourcing, FM-to-PDF & Acrobat courses

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 16, 2009 Jun 16, 2009

Copy link to clipboard

Copied

And if you can't embed the samples in the files, can you post them online somewhere and link to them?

Also, toy with the idea of using a landscape format to extend the length of the line that you can present.

Obviously this depends on the code samples having line breaks at some point... If they don't, embedding may be your only option.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

Thanks Art.

On Tue, 16 Jun 2009 07:22:43 -0600, Art Campbell <forums@adobe.com> wrote :

And if you can't embed the samples in the files, can you post them online

somewhere and link to them?

 

Also, toy with the idea of using a landscape format to extend the length

of the line that you can present.

Obviously this depends on the code samples having line breaks at some

point... If they don't, embedding may be your only option.

>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

Thanks Shlomo

On Tue, 16 Jun 2009 07:12:06 -0600, Shlomo Perets <forums@adobe.com> wrote :

There are variations between authoring applications, and as far as I

know, no way of controlling this aspect. Plus, there are other factors that

could adversely affect the code copied from a PDF and pasted elsewhere. For

best results, I recommend embedding the code fragments as files in the PDF.

For additional information as examples, see

http://www.microtype.com/ImprovePDF18.html

 

Shlomo Perets

 

MicroType, http://www.microtype.com/

FrameMaker/Acrobat training & consulting * FM-to-Acrobat

TimeSavers/Assistants

Template Design, Single Sourcing, FM-to-PDF & Acrobat courses

>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

Thanks Sheila.

On Mon, 15 Jun 2009 15:29:52 -0600, Sheila Carlisle <forums@adobe.com>

wrote :

Have you seen examples of PDFs from other applications where the carriage

returns don't occur in wrapped lines?

 

As far as I know this is standard behavior for PDF copying of content.

>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 17, 2009 Jun 17, 2009

Copy link to clipboard

Copied

There are no line breaks on the copied text when the "Tagged PDF" option is enabled in FM and, of course, the tag for the listing para format is included. This works for me on Framemaker 8.0p277 and Acrobat Distiller 7.1 on Windows XP. Maybe anyone can confirm this?

Best Regards,

Johannes

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 18, 2009 Jun 18, 2009

Copy link to clipboard

Copied

LATEST

That seems to work perfectly. Thanks!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines