Strange project generated pdf

I printed the project to pdf,
quit everything,
Power Off

Wait a little bit

Power On,

Load the pdf in Preview,

Create a new project
Add a Function
Copy / Paste the code…

All my vars like Loop_Idx are decimposed o, 3 lines :

Lppo
_
Idx

20 pages like that !

As a test, I Copy / Paste code into a TextEdit document to get the same result.

What happpens with 2024r4.2 ?

Incredible… a simple 2 pages Print to PDF failed too, this afternoon!

Hre’s a screenshot; top: the pdf, bottom TextEdit:

Looks like you are doing copy/paste from PDF into another app/Xojo.
I guess you have done this before.
I don’t think is easy to reproduce.
You may need to provide a sample project and a sample PDF for others to test.
It seems that the copy process is adding line feeds before/after the underscore for some unknown reason.

Yes, it seems, and I can see them even in the Finder (Show Clipboard).

It’s easy to test; select an entry with code in the Navigator
Print to PDF
Open the PDF
Copy / Paste where you want…

Forget it…

I remember I had Adobe Reader, and checked with it: the bug does not appeared !

So, the faultive seems to be Preview.

In my experiences, copying from PDF documents have never been reliable. And their purpose is exactly that: a document you shouldn’t modify easily.

1 Like

I wan to clarify the thing:
I generated the pdf to (try to) avoid troubles making copy/paste from a project to a brand new one.
So, it was just an easier way to do the things.

I could have done a multiple copy/paste into a large TextEdit document.

And after all, it is just a two controls and a bunch of Methods & Functions, not a way to live.

At last, my (bad) experience allowed me to update a not so old version when I destroyed the current version by unluck.

And, I never ever had troubles prior yesterday.

After all, it is an easy way to compare code(s) with only one opened project (how do I do that some years ago ? Load the pdf and read).

Now, if the “print to pdf” feature is bugged, this is something else.

how about using a print to text printer instead of pdf just to have a long text for copy paste?

Windows Example

i made a feature request for exporting the project as single text file from Xojo IDE.

As I wrote earlier, the problem lied with Preview.

Once loaded in Adobe Reader, I was able to copy / paste the code without problems…

But, I do not tested yet Preview from the current Sequoia (I updated earlier today).

And… Same bad behavior…

Preview Version 11.0 (1069.3.3) from January 16, 2025.

Please do keep in mind that copying Text from within a PDF does not simply do a text copy. Most PDF Readers also try a Unicode Conversion prior to the text copy and this may lead to a non-1:1 copy of what you can read on the screen to what your clipboard holds.

2 Likes