How to compile qt under windows

1.download qt-win  project

http://kde-cygwin.sourceforge.net/qt3-win32/

The qt3 project for windows if you wanna compile qt4 download qt4 opensource  edtion

2.To build qt under windows ,you can use MS VS,MingW,DEV CPP  ….

(more…)

Share

MinGW under Vista:cannot exec `cc1′

if
g++: installation problem, cannot exec `cc1plus’: No such file or directory


put the directory  contains  cc1 and  cc1plus  into your %PATH%

Share
Posted in 网站. Tags: , , . »

How to convert office document to picture

Ms Office doc =>pdf => picture (JPEG,PNG,etc..)

 

1. Install openoffice.org-headless,openoffice.org-calc,openoffice.org-writer,openoffice.org-draw,imagemagick.Under windows system, both imagemagick and ghost script were needed

2.Start openoffice  as service

#!/bin/bash
/usr/lib64/openoffice.org/program/soffice.bin -headless -nologo -norestore -accept=”socket,host=localhost,port=8100;urp;StarOffice.ServiceManage” &

3.DOWNLOAD JODConverter ,and start it

4.Convert doc to pdf

function convert2pdf($inputData,$inputType,$outputType=”application/pdf”){
 require_once ‘HTTP/Request.php’;
 $request = new HTTP_Request(“http://localhost:8080/convert/service“);
 $request->setMethod(“POST”);
 $request->addHeader(“Content-Type”, $inputType);
 $request->addHeader(“Accept”, $outputType);
 $request->setBody($inputData);
 $request->sendRequest();
 return $request->getResponseBody();
}

WARNING Install pear HTTP_Request First

# pear intall HTTP_Request

5.Convert pdf to picture

function convert2jpeg($pdffile,$dest){
 if(!file_exists($pdffile)){
  return;
 }
 exec(“convert -quality 70 -density 250 -geometry 25% $pdffile $dest”);
 $dir = dirname($dest);
 return $dir;
}

Share
Posted in ubuntu. Tags: , , , , , , , , , . »