PDF Exportation

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

PDF Exportation

Post by alexcool68 »

Hello,

I think i miss somethings,
When i want to export an article into a PDF file, the PDF write :

Cet article est en révision et ne peut être affiché.
Référence ID de l'article : #42
Auteur :
Dernière mise à jour : 2011-08-31 13:20

_______________________________________________


This article is in review mode and can't be displayed.


Who can I close the revision mode (review mode) ?

I'm sorry for my english.


Best regards.
Alex
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: PDF Exportation

Post by Thorsten »

Hi,

which version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

Hello Thorsten,

Informations sur votre système
_______
phpMyFAQ Version
phpMyFAQ 2.6.17
Server Software
Apache/2.2.16
PHP Version
PHP 5.3.3-7+squeeze3
Register Globals
off
Safe Mode
off
Open Basedir
off
Database Server
Mysql
Database Client Version
5.1.49
Database Server Version
5.1.49-3
Webserver Interface
APACHE2HANDLER
______________


phpMyFAQ 2.6.17


It's the last version i think.
JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: PDF Exportation

Post by JochenS »

Have you enabled the medium access level?
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

Yes ofc !
JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: PDF Exportation

Post by JochenS »

This is an issue that will be fixed with the 2.7 (beta 3 has already this fix). If you don't wish to install it you could try it with the attached pdf.php

Code: Select all

<?php
/**
 * PDF export
 * 
 * PHP Version 5.2
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations
 * under the License.
 * 
 * @category  phpMyFAQ
 * @package   Frontend 
 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
 * @author    Peter Beauvain <pbeauvain@web.de>
 * @author    Olivier Plathey <olivier@fpdf.org>
 * @author    Krzysztof Kruszynski <thywolf@wolf.homelinux.net>
 * @author    Matteo Scaramuccia <matteo@phpmyfaq.de>
 * @copyright 2003-2010 phpMyFAQ Team
 * @license   http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1
 * @link      http://www.phpmyfaq.de
 * @since     2003-02-12 
 */

define('IS_VALID_PHPMYFAQ', null);

require_once 'inc/Init.php';
PMF_Init::cleanRequest();
session_name(PMF_COOKIE_NAME_AUTH . trim($faqconfig->get('main.phpMyFAQToken')));
session_start();

// get language (default: english)
$Language = new PMF_Language();
$LANGCODE = $Language->setLanguage($faqconfig->get('main.languageDetection'), $faqconfig->get('main.language'));

if (isset($LANGCODE) && PMF_Language::isASupportedLanguage($LANGCODE)) {
    require_once "lang/language_".$LANGCODE.".php";
} else {
    $LANGCODE = "en";
    require_once "lang/language_en.php";
}
//
// Initalizing static string wrapper
//
PMF_String::init($LANGCODE);

$category = new PMF_Category();

$currentCategory = PMF_Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT);
$id              = PMF_Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT);

if (is_null($currentCategory) || is_null($id)) {
    header('HTTP/1.1 403 Forbidden');
    print 'Wrong HTTP GET parameters values.';
    exit();
}

$faq = new PMF_Faq();
$faq->getRecord($id);

session_cache_limiter('private');
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

if (preg_match("/MSIE/i", $_SERVER["HTTP_USER_AGENT"])) {
    header("Content-type: application/pdf");
    header("Content-Transfer-Encoding: binary");
    header("Content-Disposition: attachment; filename=".$id.".pdf" );
} else {
    header("Content-Type: application/pdf");
}

$faq->buildPDFFile($currentCategory);
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

I will try it right now !

Edit : It's doesn't work. Very Strange !
JochenS
Posts: 121
Joined: Wed Feb 16, 2011 3:51 pm
Location: Schönaich
Contact:

Re: PDF Exportation

Post by JochenS »

Is there an error message?
Our public FAQ is proudly powered by phpMyFAQ: http://vhtfaq.ge51.honeywell.de/
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

no !

Attached to this reply, a link of my problem in a screen shot :

http://imageshack.us/photo/my-images/689/pmfc.jpg/

This is weird because when i was stated to use phpmyfaq on a windows server 2008 with apache and mysql server, i didn't had this error !!

It is possible to say that the databases is "corrupt" or something like that ?
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: PDF Exportation

Post by jason102178 »

Have you tried installing the 2.7 RC since we released it the other day...
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

I will do this today.
alexcool68
Posts: 7
Joined: Wed Aug 31, 2011 10:53 am

Re: PDF Exportation

Post by alexcool68 »

UP

I have reinstalled the new version today and it say allway the same things : The news is in revision mode or i have this :
Sans titre.jpg

(I think it's a adobe error).

So weird I don't understand ...
You do not have the required permissions to view the files attached to this post.
jason102178
Posts: 200
Joined: Tue Nov 02, 2010 9:08 am
Location: United States-Ohio
Contact:

Re: PDF Exportation

Post by jason102178 »

Thorsten may have some insight as to why it may be doing it, i just tested on my own FAQS as well as my test system and both were able to export pdf just fine without the error in revision mode, as far as we know nothing has been reported yet about this being an issue, you also could check to make sure when you installed the new version that all files were uploaded, i have had cases were the ftp program acually missed a file while transfering causing different things not to work. or as you mentioned it could just be an adobe issue.
phpMyFAQ Quality Assurance / Forum Moderator
Amazon.com Wishlist
Thorsten
Posts: 15562
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: PDF Exportation

Post by Thorsten »

Hi,

which version did you install?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply