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

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

New Here ,
Jun 16, 2022 Jun 16, 2022

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
611
Translate
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

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

Translate
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

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.

Translate
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

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.pngexpand image


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
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
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.


Acrobate du PDF, InDesigner et Photoshoptographe
Translate
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