Problem with spaces when printing

Bug #150556 reported by Gaëtan Podevijn
4
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I use Gedit to program in C/C++. When i had to print my little stupid code, some "free lines" disapeared.

The code was:

// Projet 1
//
// Groupe 3

#include <iostream>
using namespace std;

int main() {
 double solde=0.0;
 // Cette variable contiendra la somme à retirer ou à verser
 int montant;
 // sera le type d'opération (retrait, versement, intérêts)
 unsigned short int operation;

 cout << "Solde du compte : " << solde << endl << endl;
 cout << "Opération (0=quitter, 1=verser, 2=retirer, 3=intérêts) ? ";

 // Tant que le chois de l'utilisateur n'est pas de terminer le programme
 while (cin >> operation && operation != 0) {
  if (operation == 1) {
   cout << "Montant à verser ? ";
   cin >> montant;
   // ajout du versement au solde total
   solde += montant;
  } else if (operation == 2) {
   cout << "Montant à retirer ? ";
   cin >> montant;
   // Si l'utilisateur demande de retirer plus que disponible
   if (montant > solde) {
    cerr << endl << "Pour garder ses amis, la banque ne fait pas crédit !";
    cerr << endl;
   } else {
    // retrait de la somme au solde total
    solde -= montant;
   }
  } else if (operation == 3) {
   // Intérêts de 0.5%
   solde *= 1.005;
  // Si l'utilisateur fait un choix non disponible
  } else {
   cerr << endl << "*** Erreur: Opération inconnue ***" << endl;
  }
  cout << endl << "Solde du compte : " << solde << endl << endl;
  cout << "Opération (0=quitter, 1=verser, 2=retirer, 3=intérêts) ? ";
 }
 cout << endl << "Solde du compte : " << solde << endl;
}

The free line after // groupe 3 was not printed as after unsigned short int operation; and cout << "Opération (0=quitter, 1=verser, 2=retirer, 3=intérêts) ? ";

Really sorry for the bad english

ProblemType: Bug
Architecture: i386
Date: Mon Oct 8 14:37:27 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/gedit
NonfreeKernelModules: fglrx
Package: gedit 2.20.1-0ubuntu2
PackageArchitecture: i386
ProcCmdline: gedit
ProcCwd: /home/herlock
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=fr_BE.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit
Uname: Linux laptop 2.6.22-13-generic #1 SMP Thu Oct 4 17:18:44 GMT 2007 i686 GNU/Linux

Tags: apport-bug
Revision history for this message
Gaëtan Podevijn (astt) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. What printer did you use? Do you get the issue if you use the pdf printing option?

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Gaëtan Podevijn (astt) wrote : Re: [Bug 150556] Re: Problem with spaces when printing

On Thu, 11 Oct 2007 11:33:29 -0000
Sebastien Bacher <email address hidden> wrote:

> Thank you for your bug. What printer did you use? Do you get the issue
> if you use the pdf printing option?
>

I tested on HP LaserJet 1000 and HP Desket 5900. The bug also appears
when using the pdf printing option.

I joined you the c++ files and the pdf file.

> ** Changed in: gedit (Ubuntu)
> Importance: Undecided => Low
> Assignee: (unassigned) => Ubuntu Desktop Bugs (desktop-bugs)
> Status: New => Incomplete
>

Revision history for this message
Sebastien Bacher (seb128) wrote :

sending attachments by mail doesn't work on launchpad at the moment. Could you also make a screenshot of the print dialog you use?

Revision history for this message
Gaëtan Podevijn (astt) wrote :

On Fri, 12 Oct 2007 21:27:30 -0000
Sebastien Bacher <email address hidden> wrote:

> sending attachments by mail doesn't work on launchpad at the moment.
> Could you also make a screenshot of the print dialog you use?
>

Here are a few screenshots that I made and the output printing pdf
file : www.labelgeek.be/images/gedit

- Gedit with the little code and lines of space (Note that the
line of space at line 6 is printed ! This is the only one);
- The print dialog;
- A preview before printing (note that lines of spaces doesn't
appear except at line 6);
- output pdf file;

I hope it's going to be helpfull.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the update, not confirming on my configuration. Could you attach the screenshots to the bug rather than on some external website so they stay available?

Changed in gedit:
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :

The code has been changed to use the new gtkprint in hardy, could you try there if you still get the issue?

Changed in gedit:
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!.

Changed in gedit:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.