C# 클래스 ConvertPDF.PDFConvert

Create by : TaGoH URL of the last version: http://www.codeproject.com/KB/cs/GhostScriptUseWithCSharp.aspx Description: Class to convert a pdf to an image using GhostScript DLL A big Credit for this code go to:Rangel Avulso I mainly create a better interface and refactor it to made it ready to use!
파일 보기 프로젝트 열기: nguyenq/VietOCR3.NET 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
output StringBuilder

공개 메소드들

메소드 설명
AnsiZtoString ( IntPtr strz ) : string

Convert a Pointer to a string to a real string

Convert ( string inputFile, string outputFile ) : bool

Convert a single file!

You must pass all the parameter for the conversion as Proprieties of this class

Convert ( string inputFile, string outputFile, string parameters ) : bool

Convert a single file!

Thanks to tchu_2000 for the help!

GetRevision ( ) : GhostScriptRevision
Initialize ( string sArgs ) : bool
PDFConvert ( ) : System
PDFConvert ( IntPtr objHandle ) : System
gsdll_stderr ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int
gsdll_stdin ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int
gsdll_stdout ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int

비공개 메소드들

메소드 설명
ClearParameters ( GCHandle &aGCHandle, GCHandle &gchandleArgs ) : void

Remove the memory allocated

Convert ( string inputFile, string outputFile, bool throwException, string options ) : bool

Convert a single file!

You must pass all the parameter for the conversion as Proprieties of this class

CopyMemory ( IntPtr Destination, IntPtr Source, uint Length ) : void
GetGeneratedArgs ( string inputFile, string outputFile, string otherParameters ) : string[]

This function create the list of parameters to pass to the dll with parameters given directly from the program

Be very Cautious using this! code provided and modified from tchu_2000

SaveOutputToImage ( object sender, System e ) : void
StringToAnsiZ ( string str ) : byte[]

Convert a Unicode string to a null terminated Ansi string for Ghostscript. The result is stored in a byte array

gsapi_delete_instance ( IntPtr instance ) : void
gsapi_delete_instance32 ( IntPtr instance ) : void
gsapi_delete_instance64 ( IntPtr instance ) : void
gsapi_exit ( IntPtr instance ) : void
gsapi_exit32 ( IntPtr instance ) : int
gsapi_exit64 ( IntPtr instance ) : int
gsapi_init_with_args ( IntPtr instance, int argc, IntPtr argv ) : int
gsapi_init_with_args32 ( IntPtr instance, int argc, IntPtr argv ) : int
gsapi_init_with_args64 ( IntPtr instance, int argc, IntPtr argv ) : int
gsapi_new_instance ( IntPtr &pinstance, IntPtr caller_handle ) : int
gsapi_new_instance32 ( IntPtr &pinstance, IntPtr caller_handle ) : int
gsapi_new_instance64 ( IntPtr &pinstance, IntPtr caller_handle ) : int
gsapi_revision ( GS_Revision &pGSRevisionInfo, int intLen ) : int
gsapi_revision32 ( GS_Revision &pGSRevisionInfo, int intLen ) : int
gsapi_revision64 ( GS_Revision &pGSRevisionInfo, int intLen ) : int
gsapi_set_stdio ( IntPtr lngGSInstance, StdioCallBack gsdll_stdin, StdioCallBack gsdll_stdout, StdioCallBack gsdll_stderr ) : int
gsapi_set_stdio32 ( IntPtr lngGSInstance, StdioCallBack gsdll_stdin, StdioCallBack gsdll_stdout, StdioCallBack gsdll_stderr ) : int
gsapi_set_stdio64 ( IntPtr lngGSInstance, StdioCallBack gsdll_stdin, StdioCallBack gsdll_stdout, StdioCallBack gsdll_stderr ) : int

메소드 상세

AnsiZtoString() 공개 정적인 메소드

Convert a Pointer to a string to a real string
public static AnsiZtoString ( IntPtr strz ) : string
strz System.IntPtr the pointer to the string in memory
리턴 string

Convert() 공개 메소드

Convert a single file!
You must pass all the parameter for the conversion as Proprieties of this class
public Convert ( string inputFile, string outputFile ) : bool
inputFile string The file PDf to convert
outputFile string The image file that will be created
리턴 bool

Convert() 공개 메소드

Convert a single file!
Thanks to tchu_2000 for the help!
public Convert ( string inputFile, string outputFile, string parameters ) : bool
inputFile string The file PDf to convert
outputFile string The image file that will be created
parameters string You must pass all the parameter for the conversion here
리턴 bool

GetRevision() 공개 메소드

public GetRevision ( ) : GhostScriptRevision
리턴 GhostScriptRevision

Initialize() 공개 메소드

public Initialize ( string sArgs ) : bool
sArgs string
리턴 bool

PDFConvert() 공개 메소드

public PDFConvert ( ) : System
리턴 System

PDFConvert() 공개 메소드

public PDFConvert ( IntPtr objHandle ) : System
objHandle System.IntPtr
리턴 System

gsdll_stderr() 공개 메소드

public gsdll_stderr ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int
intGSInstanceHandle System.IntPtr
strz System.IntPtr
intBytes int
리턴 int

gsdll_stdin() 공개 메소드

public gsdll_stdin ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int
intGSInstanceHandle System.IntPtr
strz System.IntPtr
intBytes int
리턴 int

gsdll_stdout() 공개 메소드

public gsdll_stdout ( IntPtr intGSInstanceHandle, IntPtr strz, int intBytes ) : int
intGSInstanceHandle System.IntPtr
strz System.IntPtr
intBytes int
리턴 int

프로퍼티 상세

output 공개적으로 프로퍼티

public StringBuilder output
리턴 StringBuilder