I am running:
Name : Code::Blocks
Version : 20.03-r11997
SDK Version : 2.0.0
Scintilla Version: 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at Feb 13 2022 17:28:47
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.31.
on: KDE Neon 5.24
My printer has been working on my Linux system forever. I can print the C code from other editors.
I'm trying to print from Code::Blocks File menu item Print.
All the text is squashed to the left.
Is there a Code::Blocks bug database somewhere?
The bug tracker is here (https://sourceforge.net/p/codeblocks/tickets/)
Please check the nightly to see if it has been fixed since the 20.03 release as allot of changes have been done since the 20.03 release. Also there are some reports in 2017 for printing issue, which you may want to have a look at to see if they can possibly help, but they may not.
There is one ticket related to printing. It's url is:
https://sourceforge.net/p/codeblocks/tickets/48/
Also if you do create a ticket can you please include the following info as it will help C::B dev who looks at the ticket to setup the printing environment as close to your setup as possible o see if they can reproduce the problem:
- Linux distro installed?
- Distro version installed?
- Kernel version installed?
- How you have setup the printing sub syste?
- Which printer driver you are using?
- Anything else you think may be relevant for Linux and printing
I have not setup printing in Linux, so some of the point above may not be right.
During working on ticket 48 i found a printing bug on GTK where some text gets mangled at a top corner.
I work on it, but until now i was not able to debug it to an extend where i know what is going on...
But i think the bug you have is some other kind....
I have just tried printing on the CutePDF printer. Instead of asking for the output filename, C::B blocks forever showing a busy animation as mouse pointer.
Name : Code::Blocks
Version : svn-r12723
SDK Version : 2.16.0
Scintilla Version : 3.7.5
OS : Windows 7 (build 7601, Service Pack 1), 64-bit edition
The problem is in cbEditorPrintout::GetPageInfo(), virtual printers are returning a 0 page size in line 99, so m_printRect is invalid and the program enters this loop forever:
while (HasPage(*maxPage))
{
//Manager::Get()->GetLogManager()->DebugLog(_T("CountPages: PageCount %d , m_printed %d"), m_pPageSelStart->GetCount(), m_printed);
m_printed = m_TextControl->FormatRange (0, m_printed, m_SelEnd,
dc, dc, m_printRect, m_pageRect);
m_pPageSelStart->Add(m_printed);
*maxPage += 1;
}
EDIT: today the CutePDF printer works, but MS XPS printer still fails. MSW10 built-in PDF printer also works OK.
@Steven Friedrich:
- Are you using HiDPI (more than 96 pixels per inch)?
- Can you attach an scan or photo of the printed page?
Is the problem with the page size present in my patch? I think i have reworked this.
I have not tested your patch, the problem is with current trunk. I will take a look at your patch.
When using XPS printer, ppd->GetPaperId() (at cbeditorprintout.cpp:99) returns wxPAPER_NONE and the page size is (0, 0).
Printing on Mint 18 is a mess, using default values with the built-in Print to File driver you get the attached PDF.
In suggest creating a ticket to track this bug(s).
Ticket 1214 (https://sourceforge.net/p/codeblocks/tickets/1214/)