Bug 38448 - kghostview can not display pdf embedded into HTML frames
Summary: kghostview can not display pdf embedded into HTML frames
Status: RESOLVED FIXED
Alias: None
Product: kghostview
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: HI normal
Target Milestone: ---
Assignee: Wilco Greven
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-20 14:33 UTC by Moritz Moeller-Herrmann
Modified: 2003-06-24 22:53 UTC (History)
1 user (show)

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


Attachments
a all in one test case (74.81 KB, application/x-tbz)
2003-06-08 14:55 UTC, Luís Pedro Coelho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Moeller-Herrmann 2002-02-20 14:28:49 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kghostview
Version:           0.13pre2 (using KDE 2.9.0 3 (CVS >= 20020213))
Severity:          normal
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:                Linux (i686) release 2.4.16-4GB
OS/Compiler notes: 

Unfortunately kghostview still does not work fine as replacement for nspluginviewer+Adobe on this page.

http://www.parlamentsspiegel.de/cgi-bin/hyperdoc/show_dok.pl?k=BAD11/2

Now kghostview accepts the .pl ending and loads but unfortunately it does not start as plugin of konqui in a frame but as a noemal app in it's own window.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Moritz Moeller-Herrmann 2002-09-13 19:49:47 UTC
Still present in KDE-3.1b1  
See e.g.  
http://www.parlamentsspiegel.de/cgi-bin/hyperdoc/show_dok.pl?pl=BA&part=D&pnr=13/10&quelle=parla 
Comment 2 Moritz Moeller-Herrmann 2002-11-10 18:06:55 UTC
kghostview in KDE-3.1 post rc2 does still not work in konqueror HTML frames. I hope 
this gets fixed before KDE-3.1 gets released, so I set the priority up a little... 
Comment 3 Moritz Moeller-Herrmann 2003-02-11 11:29:54 UTC
This grave bug is still present in KDE-3.1! 
Comment 4 Luís Pedro Coelho 2003-06-08 14:55:51 UTC
Created attachment 1745 [details]
a all in one test case
Comment 5 Luís Pedro Coelho 2003-06-24 22:53:09 UTC
Subject: kdegraphics/kghostview

CVS commit by luis_pedro: 

Use the KGVFactory class.

Fixes bug 38448 (this was a tough one)

CCMAIL: 38448-done@bugs.kde.org


  M +2 -2      Makefile.am   1.74
  M +9 -0      kgv_view.cpp   1.144
  M +0 -5      kgv_view.h   1.72
  M +1 -0      kgvconfigdialog.cpp   1.23
  M +3 -0      kgvdocument.cpp   1.15


--- kdegraphics/kghostview/Makefile.am  #1.73:1.74
@@ -19,5 +19,5 @@
         kgvconfigdialog.cpp kgvmainwidget.cpp qttableview.cpp \
         kdscerrordialog.cpp displayoptions.cpp kpswidget.cpp \
-        fullscreenfilter.cpp
+        fullscreenfilter.cpp kgvfactory.cpp
 
 kghostview_SOURCES = main.cpp
@@ -33,5 +33,5 @@
         kgvpagedecorator.h kgvconfigdialog.h kgvmainwidget.h dscparse.h \
         dscparse_adapter.h qttableview.h kdscerrordialog.h kgvdocument.h displayoptions.h \
-        fullscreenfilter.h
+        fullscreenfilter.h kgvfactory.h
 
 METASOURCES = AUTO

--- kdegraphics/kghostview/kgv_view.cpp  #1.143:1.144
@@ -36,4 +36,5 @@
 #include <kio/scheduler.h>
 #include <kkeydialog.h>
+#include <kaboutdata.h>
 
 #include "kgv_view.h"
@@ -45,4 +46,5 @@
 #include "kgvmainwidget.h"
 #include "kpswidget.h"
+#include "kgvfactory.h"
 #include "logwindow.h"
 #include "marklist.h"
@@ -699,4 +701,11 @@ void KGVPart::slotMimetypeFinished( cons
     kdDebug(4500) << "KGVPart::slotMimetype: type=" << type << endl;
     _mimetype = type;
+    if ( _mimetype == "application/x-gzip" ) {
+        kdDebug(4500) << "KGVPart::slotMimetype: tranforming URL" << endl;
+        delete _mimetypeScanner; 
+        _mimetypeScanner = 0;
+        openURL( KURL( QString::fromLatin1( "gzip:/decompress/" ) + m_url.url() ) );
+        return;
+    }
     if( _mimetypeScanner->hasError() )
         emit canceled( QString::null );

--- kdegraphics/kghostview/kgv_view.h  #1.71:1.72
@@ -25,5 +25,4 @@
 #include <kio/job.h>
 #include <kparts/browserextension.h>
-#include <kparts/genericfactory.h>
 #include <krun.h>
 
@@ -220,8 +219,4 @@ public slots:
     void print();
 };
-
-
-typedef KParts::GenericFactory<KGVPart> KGVFactory;
-
 
 class KGVRun : public KRun

--- kdegraphics/kghostview/kgvconfigdialog.cpp  #1.22:1.23
@@ -39,4 +39,5 @@
 
 #include "kgv_view.h"
+#include "kgvfactory.h"
 
 #include "kgvconfigdialog.h"

--- kdegraphics/kghostview/kgvdocument.cpp  #1.14:1.15
@@ -32,8 +32,11 @@
 #include <ktempfile.h>
 #include <kio/netaccess.h>
+#include <klocale.h>
+#include <kdebug.h>
 
 #include "kdscerrordialog.h"
 #include "kgv_miniwidget.h"
 #include "marklist.h"
+#include "kgvfactory.h"
 
 extern "C" {