I have a document which is published as a PDF. There are multiple codeblocks containing code within the document. THe alignment of the code displayed in the PDF is correct. When I copy the codeblock from the output and paste it in a txt file, I see that the alignment is not correct. The leading spaces are not shown, and so all the lines start at the same level. Is there any way to fix the alignment issue while copying the codeblock?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Anish2 ,
Offering some generic solutions that you can try -
1) Try pasting using the option retaining source formatting.
2) You can select the code block or even the entire code in the file and apply the code indentation using any IDE such as eclipse and IntelliJ. You can also configure the indentation using IDE settings.
3) Use any online code beautifier for your file.
Regards,
Manpreet
Hi @Anish2 ,
Offering some generic solutions that you can try -
1) Try pasting using the option retaining source formatting.
2) You can select the code block or even the entire code in the file and apply the code indentation using any IDE such as eclipse and IntelliJ. You can also configure the indentation using IDE settings.
3) Use any online code beautifier for your file.
Regards,
Manpreet