Piwik 0.5 auto update script still reports pclzip_err_bad_format issue

Please visit How to fix pclzip_err_bad_format issue when automatically update Piwik

through my Piwik statics, I noticed many keywords focus on “pclzip_err_bad_format”, then I noticed Piwik 0.5 releases.
When I tried automatically update Piwik, I got the same issue with Piwik 0.45.
And I decided upgrade Piwik manually this time.
using ssh to login my host
download Piwik 0.5
wget http://piwik.org/latest.zip
back up config.ini.php
cp piwik/config/config.ini.php .
use the Piwik 0.5 replace the old version
unzip latest.zip
browser my Piwik website and finish the upgrade.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

PDFCrypt Addition-Drag and Decrypt

I got a email from George yesterday. he said,

Hi,
I found your pdfcrypt program and wrote a CMD file that, if you place it in the same folder as pdfcrypt.exe, will let you drag an encrypted (but non-password protected) PDF onto the .cmd file to make a decrypted copy of the PDF in the same folder as the original. I put it under the GPL, so you can redistribute it with pdfcrypt, or post it on your site, or ignore it completely.
The script is attached with a .txt extension so that it is not flagged as a potential threat. You can look through it to ensure it does nothing but facilitate decrypting.

Thanks for your work pdfcrypt, it is much appreciated!

George

And here is the code he contributed, thanks for George’s kindness.

REM Written by George Tenney 11-29-09

REM Usage: Drop an encrypted, but non-password protected, PDF onto
REM this .cmd file to create a decrypted version in the same folder
REM as the original PDF.

REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM To receive a copy of the GNU General Public License
REM see .

@ECHO OFF
REM Set pdfcrypt location
SET PROG=%0
SET PROG=%PROG:~0,-14%pdfcrypt.exe"

REM Check for quotes in filename (i.e., space in path)
SET INFILE=%1
IF ^%INFILE:~0,1% NEQ ^" GOTO :ADDQ
REM ELSE
GOTO :NOADDQ

:ADDQ
REM Add quotes around filenames
SET INFILE="%INFILE%"
SET OUTFILE=%INFILE:~0,-5%_DECRYPT.pdf"
GOTO :RUNNOW

:NOADDQ
REM Don't add quotes around filenames
SET OUTFILE=%INFILE:~0,-5%_DECRYPT.pdf"

:RUNNOW
REM Display Messages
CLS
ECHO.
ECHO.
ECHO Decrypting...
ECHO.
ECHO Input File:
ECHO %INFILE%
ECHO.
ECHO Output File: (WILL BE OVERWRITTEN)
ECHO %OUTFILE%
ECHO.
PAUSE

ECHO.
ECHO.
ECHO This may take a minute, please wait.
ECHO.
ECHO.
ECHO.

REM Run the decryption
%PROG% %INFILE% %OUTFILE% decrypt ""
ECHO.
ECHO.
ECHO Press any key to exit.
PAUSE > NUL

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride

Convert RTF to PDF with Open Source library iText

Version 2.1 of iText has partial support for reading an RTF file and converting it to a PDF. This feature is still under development.

and here is the example on how to parser and convert RTF to PDF(from http://cfsearching.blogspot.com/2009/04/itext-preview-of-things-to-come-someday.html)

import com.lowagie.text.Document;

import com.lowagie.text.DocumentException;

import com.lowagie.text.pdf.PdfWriter;

import com.lowagie.text.rtf.parser.RtfParser;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

public class ConvertRTFToPDF {


public static void main(String[] args) {

 String inputFile = "sample.rtf";

 String outputFile = "sample_converted.pdf";

 // create a new document

 Document document = new Document();

 try {

     // create a PDF writer to save the new document to disk

     PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(outputFile));

     // open the document for modifications

     document.open();

     // create a new parser to load the RTF file

     RtfParser parser = new RtfParser(null);

     // read the rtf file into a compatible document

     parser.convertRtfDocument(new FileInputStream(inputFile), document);

     // save the pdf to disk

     document.close();

     System.out.println("Finished");

 } catch (DocumentException e) {

     e.printStackTrace();

 } catch (FileNotFoundException e) {

     e.printStackTrace();

 } catch (IOException e) {

     e.printStackTrace();

 }

}

}

Share and Enjoy:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • BlinkList
  • blogmarks
  • blogtercimlap
  • connotea
  • DotNetKicks
  • Fark
  • Fleck
  • Gwar
  • Haohao
  • IndianPad
  • Internetmedia
  • LinkaGoGo
  • MyShare
  • Netscape
  • NewsVine
  • Rec6
  • Reddit
  • Scoopeo
  • Slashdot
  • StumbleUpon
  • Technorati
  • Webride