printing C++ source file in VS2022 throws garbage

Hi,

I have a C++ source file that when printing from VS2022 prints what seems garbage (actually it seems to be using a strange font which is impossible to understand )

Only part of the source file (the first 4 pages) prints illegible the rest prints fine.

I tried Visual Studio Code but that program does not seem to have a Print command.

Please help since I need to print my code

Regards,
Juan Dent
Is it just this one source file that has this problem?

Does it contain any badly encoded UNICODE or UTF-8 characters in the comments?
Say for example, if you delete the funny looking chars, does it then print OK?

Open the file in say notepad++ to see if you have a similar problem printing it from there.

>Open the file in say notepad++ to see if you have a similar problem printing it >from there.

The problem occurs only from VS2022 and it is in only some part of the file

There is no funny looking chars in the screen only when printing the first 4 pages of the file!

How do I change (and to what) the encoding?



any chance one or all of your code snippet settings use the "Cascadia" font?

if it does, note that you have to change it in the *printing* fonts section, not the displayed fonts section -- these are distinct settings in this version of visual studio (not sure if they ever merged them, I never cared about this at all).

another workaround is to print to pdf using MS pdf writer, which will generate the correct document and adobe will print it correctly. But I would skip this if possible and rewire the printed fonts section to use a different font.


Last edited on
Registered users can post here. Sign in or register to post.