php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9821 ClibPDF cpdf_set_viewer_preferences function not working
Submitted: 2001-03-18 14:45 UTC Modified: 2001-03-30 16:00 UTC
From: sigurd at folken dot no Assigned:
Status: Closed Package: ClibPDF related
PHP Version: 4.0.4pl1 OS: Redhat 7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sigurd at folken dot no
New email:
PHP Version: OS:

 

 [2001-03-18 14:45 UTC] sigurd at folken dot no
Just thought I'd leave my small patch for making the cpdf_set_viewer_preferences work a bit. I can't seem
to find anywhere else to leave it.


----BEGIN PATCH
--- php-4.0.4pl1/ext/cpdf/cpdf.c	Wed Oct 25 19:43:49 2000
+++ php-4.0.4pl1/ext/cpdf/cpdf.c	Tue Mar  6 19:51:41 2001
@@ -338,6 +339,7 @@
 /* {{{ proto void cpdf_set_viewer_preferences(int pdfdoc, int pagemode)
    How to show the document by the viewer */
 PHP_FUNCTION(cpdf_set_viewer_preferences) {
+	CPDFviewerPrefs vP = { 0, 0, 0, 0, 0, 0, 0, 0 };
 	pval *argv[6];
 	int id, type, pagemode;
 	int argc;
@@ -361,6 +363,9 @@
 	}
 
 /*	cpdf_setViewerPreferences(pdf, pagemode, 0, 0, 0, 0, 0, 0, pagemode); */
+	vP.pageMode=pagemode;
+	vP.nonFSPageMode=pagemode;
+	cpdf_setViewerPreferences(pdf, &vP); 
 
 	RETURN_TRUE;
 }
---END PATCH

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-18 14:57 UTC] ohrn@php.net
I'll look into it.
 [2001-03-30 16:00 UTC] ohrn@php.net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 09:01:28 2024 UTC