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

Code snippets in interactive PDF have breaks where wrapping occurred, can't copy/paste

New Here ,
Jun 16, 2022 Jun 16, 2022

Copy link to clipboard

Copied

I'm creating a technical paper in InDesign and exporting to PDF. I'm hoping that the code snippets I'm pasting into the doc can remain without breaks and simply wrap visually, but when I copy/paste out of the PDF into a text editor, breaks have been created where the lines wrapped. Autotag didn't help.

TOPICS
Create PDFs , Edit and convert PDFs , How to

Views

347

Translate

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 Expert ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

Use the code snippets as file attachments of the PDF file.

Votes

Translate

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 Expert ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

You should ask in the InDesign forums. I'm sure it's possible to do it, it's just a question of how to set it up correctly there, before exporting to PDF.

Votes

Translate

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 Expert ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

I've had this problem before, which I solved by putting all the code on a separate layer in InDesign, so that I could export to PDF without the code and thus leaving empty spaces.

Then with Acrobat Pro I added text fields containing the code over the empty areas.

This way there are no unwanted characters when copying and pasting.

 

Another advantage is that you are not limited by the length of the code on the page since it can scroll.

 

Capture_500.png

Votes

Translate

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 Expert ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

LATEST

I guess it is also possible to create the text fields containing the code directly in the InDesign document but I haven't tried.

Votes

Translate

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