Bug 107991 - cannot print into PDF with kpresenter 1.4.0a
Summary: cannot print into PDF with kpresenter 1.4.0a
Status: CLOSED FIXED
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-23 12:37 UTC by Giovanni Venturi
Modified: 2008-12-31 18:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
the file I tryed to print into PDF (20.08 KB, application/x-kpresenter)
2005-06-23 12:38 UTC, Giovanni Venturi
Details
printed to pdf (30.00 KB, application/pdf)
2005-06-29 14:10 UTC, T Zachmann
Details
the new logo that I inserted and I get the same error (6.21 KB, image/png)
2005-07-02 19:36 UTC, Giovanni Venturi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Venturi 2005-06-23 12:37:42 UTC
Version:           1.4.0a (using KDE 3.4.1, compiled sources)
Compiler:          gcc version 3.3.5
OS:                Linux (i686) release 2.6.10

I cannot print a PDF with the new version of KPresenter. I printed into PDF till KPresenter 1.3.5 . The problem is jsut with KPresenter. I printed into PDF from KWord 1.4.0a and KSpread 1.4.0a.
Here some konsole output:

kpresenter: Loading took 0.169 seconds
kio (KTrader): query for KDECompressionFilter : returning 1 offers
kio (Filter): KFilterBase::findFilterByMimeType(application/x-gzip) got 1 offers
koffice (lib kofficecore): File documentinfo.xml loaded and parsed
kio (KTrader): query for KDECompressionFilter : returning 1 offers
kio (Filter): KFilterBase::findFilterByMimeType(application/x-gzip) got 1 offers
koffice (lib kofficecore): KoPicture::load(QIODevice*, const QString&) png
koffice (lib kofficecore): KoPictureShared::load(QIODevice*, const QString&) png
koffice (lib kofficecore): HighResolution = 1
koffice (lib kofficecore): KoMainWindow::addRecentURL url=file:///home/slacky/KDE/aKademy2005/aKademy2005.kpr
koffice (lib kofficecore): [KoMainWindow pointer (0x82824e0) to widget kpresenter-mainwindow#1, geometry=1272x723+0+0] Saving recent files list into config. instance()=0x81d3430
kparts: found KParts Plugin : /opt/kde34/share/apps/kpresenter/kpartplugins/scan-kpresenter.rc
kparts: load plugin
kio (KTrader): query for KOfficePart : returning 11 offers
kparts: 0x82ba0b8 emitting activePartChanged 0x82050e8
kparts: ReadOnlyPart::guiActivateEvent -> file:///home/slacky/KDE/aKademy2005/aKademy2005.kpr
kdeprint: kdeprint: registering 0xbfffe934, number of objects = 1
kpresenter: WARNING: You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE.
kdeprint: kdeprint: registering 0x8568280, number of objects = 2
kdeprint: kdeprint: registering 0x8568318, number of objects = 3
kdeprint: kdeprint: registering 0x859df54, number of objects = 4
kdeprint: kdeprint: registering 0x857d34c, number of objects = 5
kdeprint: kdeprint: registering 0x859aa70, number of objects = 6
kdeprint: Checking for update possible
kdeprint: Starting async connect
kdeprint: Connection failed trials=5
kdeprint: Starting async connect
kdeprint: Connection failed trials=4
kdeprint: Starting async connect
kdeprint: Connection failed trials=3
kdeprint: Starting async connect
kdeprint: Connection failed trials=2
kdeprint: Starting async connect
kdeprint: Connection failed trials=1
kdeprint: Starting async connect
kdeprint: Connection failed trials=0
kio (UIServer): Source Mimetype: application/octet-stream
kio (UIServer): Dest Mimetype: application/pdf
kio (KTrader): query for application/pdf : returning 0 offers
kdeprint: kdeprint: unregistering 0x859df54, number of objects = 5
kdeprint: kdeprint: unregistering 0x859aa70, number of objects = 4
kdeprint: kdeprint: unregistering 0x857d34c, number of objects = 3
kdeprint: kdeprint: status message: Inizializzazione in corso...
kdeprint: Resetting page size
kdeprint: ********************
kdeprint: PageSize = A4
kdeprint: kde-collate = Uncollate
kdeprint: kde-copies = 1
kdeprint: kde-current = 0
kdeprint: kde-docname = aKademy2005
kdeprint: kde-frompage = 1
kdeprint: kde-isspecial = 1
kdeprint: kde-maxpage = 5
kdeprint: kde-minpage = 1
kdeprint: kde-orientation = Landscape
kdeprint: kde-orientation-fixed = 1
kdeprint: kde-outputfilename = /home/slacky/KDE/aKademy2005/aKademy2005.pdf
kdeprint: kde-outputtofile = 1
kdeprint: kde-pageorder = Forward
kdeprint: kde-pageset = 0
kdeprint: kde-pagesize = 0
kdeprint: kde-pagesize-fixed = 1
kdeprint: kde-preview = 0
kdeprint: kde-printcommand =
kdeprint: kde-range = 1-5
kdeprint: kde-special-command = ps2pdf
kdeprint: kde-topage = 5
kdeprint: media = A4
kdeprint: orientation-requested = 4
kdeprint: kdeprint: status message: Generazione dati di stampa in corso: pagina 1
kpresenter: KPresenterView::print scaling by 1,1
kdeprint: kdeprint: status message: Generazione dati di stampa in corso: pagina 2
kdeprint: kdeprint: status message: Generazione dati di stampa in corso: pagina 3
kdeprint: kdeprint: status message: Generazione dati di stampa in corso: pagina 4
kdeprint: kdeprint: status message: Generazione dati di stampa in corso: pagina 5
kdeprint: kdeprint: status message: Invio dei dati di stampa alla stampante in corso: Stampa su file (PDF)
kdeprint: kdeprint: print command: gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{/home/slacky/KDE/aKademy2005/aKademy2005.pdf} -sPAPERSIZE=a4  -c .setpdfwrite -f '/tmp/kde-slacky/kdeprint_HGvIo38s'
kdeprint: kdeprint: status message:
kdeprint: kdeprint: status message:
kpresenter: KPresenterView::print zoom&res reset
kdeprint: kdeprint: unregistering 0xbfffe934, number of objects = 2
Comment 1 Giovanni Venturi 2005-06-23 12:38:29 UTC
Created attachment 11555 [details]
the file I tryed to print into PDF
Comment 2 T Zachmann 2005-06-29 14:10:51 UTC
Created attachment 11621 [details]
printed to pdf

Hello Giovanni,

I have no problems with printing into to pdf. See the attached pdf for your
presentation. What exactly is the problem you have during printing. Does it
looks bad or doesn't it print at all?

Thorsten
Comment 3 Giovanni Venturi 2005-06-29 20:22:32 UTC
I got an KMessageBox:

A print error occurred. Error message received from system:

Abnormal process termination (gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{/home/slacky/KDE/aKademy2005/aKademy2005.pdf} -sPAPERSIZE=a4 -c .setpdfwrite -f '/tmp/kde-slacky/kdeprint_UaO4n6E3' ).

Strange because happen just for KPresenter...
Comment 4 Giovanni Venturi 2005-06-30 14:07:33 UTC
I tryed to create a new Presentation from the beginning (just a page and two text box) and KPresenter prints in PDF, so I think it's some elements into the presentation that breaks the printing, or a bug relative to import the presentation from KPresenter 1.3 to KPresenter 1.4 that creates some difficult element for PDF printing...
Comment 5 Giovanni Venturi 2005-07-02 00:02:40 UTC
I've got gs 8.15.0 . Slackware-current. I can print on PS by KPresenter. Trying to ps2pdf the file I got a correct PDF file. I can see PS correctly with KGhostView and the ps2pdfed file with KPDF.
Comment 6 Thiago Macieira 2005-07-02 02:36:05 UTC
Sorry, Giovanni, it works here for me.
Comment 7 T Zachmann 2005-07-02 18:47:13 UTC
This more likely sounds like a local problem of your gs installation as it works here without problems.

Maybe you can check with the kprinter guys to see if they have any idea. 

As this is not a kpresenter problem I will close the bug report for now.
Comment 8 Giovanni Venturi 2005-07-02 19:36:11 UTC
Created attachment 11659 [details]
the new logo that I inserted and I get the same error
Comment 9 Giovanni Venturi 2005-07-02 19:36:54 UTC
You cannot close this bug as "WORKSFORME" because I made some try. I installed a slackware-current on a new machine using the KDE 3.4.1 and KOffice 1.4.0a slackware-current binary packet. I found the object into the presentation that made that error: the KDE logo in the top right of the presentation. Removing it I can print on PDF. That image was directly into the file presentation from KPresenter 1.3.x I didn't inserted the image with "Insert image..." menu. I tryed inserting the object again removing it in all the pages and it doesn't work, so I tryed to insert a digital photo take with my camera into a new presentation and it printed the PDF. I tryed to substitute the KDE icon with the file attached to this bug and I get no PDF file... We have to reopen the bug and assign it to someone else that write the part the gave this bug. I want help to solve it so ask me to try what you need.
Comment 10 Giovanni Venturi 2005-07-02 19:40:38 UTC
According to T Zachmann the bug is for kdeprint team. If this is not correct. Specify the correct component, please.
Comment 11 Cristian Tibirna 2005-09-27 08:18:52 UTC
I think it is a gs and/or a Qt postscript generator problem but I will have to investigate further.

Anyways, for now, just to have the things written down, kdeprint uses the command:
gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{some_out.file} -sPAPERSIZE=a4 -c .setpdfwrite -f /tmp/some_temp_file.ps

This command crashes ("segmentation fault")when the KDE logo is present in the kpresenter file. The /tmp/some_temp_file.ps is generated on the fly just before the conversion.


When I print the presentation to a .ps file then do the conversion to pdf by hand using the ps2pdf command, I succeed. It turns out, ps2pdf automatically adds the option "-dCompatibilityLevel=1.2" to the other options needed by gs for a ps to pdf conversion. Thus, the pdf obtained is version 1.2. If this option isn't given, gs will attempt a default conversion to pdf version 1.3 or pdf version 1.4 (dunno which).

Of course, trying `ps2pdf13 presentation.ps pres.pdf` or `ps2pdf14 presentation.ps pres.pdf` gives crashes.

So, I now have to find out why the ps generated by Qt isn't convertible in pdf > 1.2.

I smell a gs bug.
Comment 12 Raphaël Pinson 2006-04-25 12:41:58 UTC
I confirm this bug on Kubuntu Dapper with Koffice 1.5 unofficial packages here.

I get the following error popup :

<popup>
A print error occurred. Error message received from system:

Abnormal process termination (gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=$out{/home/raphink/conf/conf.pdf} -sPAPERSIZE=a4 -c .setpdfwrite -f '/tmp/kde-raphink/kdeprint_xrv96O6t' ).
</popup>

It fails to print using the KDE3 model (even not modifying it), but not with some other ones : the mountains, KDE and the KDE2 models work for example.
Comment 13 Giovanni Venturi 2007-01-08 20:21:06 UTC
Well, with KDE 3.5.5 and KPresenter 1.6.1 and Qt 3.3.7 seems fixed.
Comment 14 Kurt Pfeifle 2007-01-09 14:08:29 UTC
Raphael,

proceed as follows:

 *  [alt]+[f2]
 *  type "kprinter"
 *  click "Run"
 *  select printer "Print to file (PDF)"
 *  Click "Properties"
 *  Select "Driver Settings" tab
 *  Locate the "Genera --> Compatibility Level" item
 *  Set it to "Level 1.2"

This should fix the problem. 

(For more background info: I dunno if this is a Qt bug generating problematic PostScript code, or a Ghostscript bug [for some older versions] which is not able to correctly process a valid PostScript statement in certain circumstances. However, the problem usually goes away when setting "-dCompatibilityLevel=1.2" for the ps2pdfwr script.)
Comment 15 John Layt 2008-12-31 18:45:56 UTC
Closing old Resolved status bug.