PDF to TIFF SDK |
1. Overview |
Pdf to TIFF SDK is a powerful pdf sdk/api, it produces fully functional tiff image documents with text, pictures, graphics etc, using the original pdf document formatting. It does not need any software support, such as Adobe Acrobat, Acrobat Reader, etc. |
2. Functions |
(01) | It quickly convert pdf document to image document. |
(02) | It supports CCITT fax image files. |
(03) | It supports encrypted pdf file. |
(04) | It supports to select individual pages for conversion. |
(05) | It supports conversion of vector graphics into image files. |
(06) | It supports to generate multipage tiff files. |
(07) | It supports any resolution in the generated image files. |
(08) | It supports conversion into color 1bit, 4bits, 8bits,4bits grayscale, 8tits grayscale and 24bits per pixel format image. |
(09) | It supports multifarious compression of tiff image, such as LZW, JPEG, PACKBITS, CCITT Group3, CCITT Group4, RLE etc. |
(10) | It allows you to preserve original document layout. |
(11) | It supports windows 2000/xp/2003/vista and windows 7 platform. |
(12) | It does not require Adobe Acrobat or Reader support. |
(13) | It supports Adobe Acrobat 3.0, 4.0, 5.0, 6.0 compatibility. |
3. System requestment |
Supported Operation Systems |
The following operation systems listed have been tested with PDF to TIFF SDK and are officially supported. |
(1) Microsoft Windows 2000 Professional; |
(2) Microsoft Windows 2000 Server and Advanced Server; |
(3) Microsoft Windows 2003 Server 32-bit Web Edition, Standard Edition and Enterprise Edition; |
(4) Microsoft Windows XP Professional and Home Edition; |
(5) Microsoft Windows Vista Ultimage and Home Edition; |
(6) Microsoft Windows 7. |
Recommended hardware |
(1) CPU: Intel(or Standard PC) 800MHz or faster compatible x86 processor; |
(2) RAM: 256MB or more RAM recommended, 128MB minimum; |
(3) Hard-disk: 100MB free space recommended, 50MB free space required; |
4. Getting Started |
|
5. Interfaces |
This section describes client sdk interfaces detailedly. |
(1). function---apOpen() |
This function opens a pdf file, if the pdf file is restricted, you can ensure owner password or user password. After it opens success, it will create a converter and return the converter's handle. |
。Syntax |
long apOpen(char *pPdfFileName, char *pOwnerPw, char *pUserPw); |
。Parameters |
pPdfFileName: Source pdf file name. It supports absolute path and relative path. | |
pOwnerPw: Pdf owner password. | |
pUserPw: Pdf user password. |
。Return value |
If the function succeeds, it returns a converter's handle. If the function fail, it returns a error code, such as the following, for more error codes, please click here. |
ERR_OVER_MAXTHREADS: Over the limit amount of threads. | |
ERR_FILE_UNEXIST: Source pdf file unexist. | |
ERR_FILE_DAMAGED: Source pdf file is damaged, or not a correct pdf file. | |
ERR_FILE_RESTRICTED: Source pdf file is restricted, such as password is wrong etc. |
(2). function---apClose() |
This function close the pdf file and destroy the converter appointed by the handle. |
。Syntax |
long apClose(long nHandle); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. |
。Return value |
It returns RTN_OK, the function succeeds, otherwise the function fails. For more error codes, please click here. |
(3). function---apConvert() |
This function converts all pages of the pdf file. |
。Syntax |
long apConvert(long nHandle); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. |
。Return value |
It returns RTN_OK,the function succeeds, otherwise the function fails. For more error codes, please click here. |
(4). function---apConvertPage() |
This function converts a certain page of the pdf file, the page appointed by the second parameter---nPageNo. |
。Syntax |
long apConvertPage(long nHandle,long nPageNo); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. | |
nPageNo: A certain page of the pdf file, which will be converted. |
。Return value |
It returns RTN_OK, the function succeeds, otherwise the function fails. For more error codes, please click here. |
(5). function---apConvertPageToStream() |
This function converts a certain page of the pdf file to memory stream, the page appointed by the second parameter---nPageNo. |
。Syntax |
long apConvertPageToStream(long nHandle, long nPageNo, BYTE *&pMemStream, long &nSize); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. | |
nPageNo: A certain page of the pdf file, which will be converted. | |
pMemStream: A pointer of memory stream, which point to result image's memory stream. | |
nSize: It is the size of memory image stream. |
。Return value |
It returns RTN_OK, the function succeeds, otherwise the function fails. For more error codes, please click here. |
Notice: The result image's memory stream managed by the sdk automatically. You need not to allocate or destory it manually. |
(6). function---apSetProperty() |
This function is to set the converter's properties, which created by function---apOpen. |
。Syntax |
long _apSetProperty( long nHandle, long nIndex, char *pValue, long nValue, long nOther); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. | |
nIndex: Property tag, refer to the section of definitions of converter's properties. | |
pValue: A String value of the property. This parameter is valid only just the type of the current property is string. | |
nValue: An integer value of the property. This parameter is valid only just the type of the current property is integer. | |
nOther: Only valid for progress call-back. It is used to call-back function as a parameter value. |
。Return value |
It returns RTN_OK, the function succeeds, otherwise the function fails. For more error codes, please click here. |
(7). function---apGetProperty() |
This function is to get the converter's properties, which created by function---apOpen. |
。Syntax |
long _apGetProperty( long nHandle, long nIndex, char *pValue, long &nValue); |
。Parameters |
nHandle: The converter's handle, which created by function---apOpen. | |
nIndex: Property tag, refer to the section of definitions of converter's properties. | |
pValue: A String value of the property. This parameter is valid only just the type of the current property is string. | |
nValue: An integer value of the property. This parameter is valid only just the type of the current property is integer. |
。Return value |
It returns RTN_OK, the function succeeds, otherwise the function fails. For more error codes, please click here. |
6. Constants |
(1). Definitions of converter's properties |
。 read/write properties
。 read only properties
。 write only properties
Notice: For more detial properties, please click here. |
(2). TIFF compression tag's definitions(supported color depths in brackets) |
|
(3). Return code's definitions |
|
7. Properties |
This section describes the properties of the converter detailedly. |
(1). Property AP_PROP_OUTDIR |
This property can be using to set output directory which the result image files placed in. Default the output directory as same path as the source PDF document. |
(2). Property AP_PROP_PREFIX |
This property can be using to set the prefix of file name of the result image. For example, the file name of source pdf is 'test.pdf', you set the image type as 'JPEG' format and the value of this property as 'mytest', so the file name of result image are 'mytest00001.jpg', 'mytest00002.jpg',...,'mytest00XXX.jpg', etc. |
(3). Property AP_PROP_PAGEZOOM |
Th property can be using to set zoom scale of PDF pages(10-200). For example, if it sets the page zoom as 120 or 80 and the result image is a 800x600 pixel, so the final result image is a 960x720 pixel or 640x480 pixel image. Default page zoom is 100. |
(4). Property AP_PROP_BITCOUNT |
This property gets or sets the color depth of an image. The component supports the following color depths,default is 24. |
1: black/white image. | |
4: 16 colors image. | |
8: 256 colors image. | |
24: true color image. |
(5). Property AP_PROP_XDPI |
This property gets or sets the horizontal resolution of the image. The component supports the resolution from 72 to 500, defualt is 120. |
(6). Property AP_PROP_YDPI |
This property gets or sets the vertical resolution of the image. The component supports the resolution from 72 to 500, defualt is 120. |
(7). Property AP_PROP_XDIMENSIONS |
This property can be used to specify the width of the final result image in pixel. |
(8). Property AP_PROP_YDIMENSIONS |
This property can be used to specify the height of the final result image in pixel. |
(9). Property AP_PROP_COMPRESSION |
Only the current output images are tiff format, this property is valid, the property can be used to get or set the compression type. The supported value of iCompression are listed below(supported color depths in brackets): |
|
(10). Property AP_PROP_QUALITY |
This property gets or sets the compression quality(1..100) for lossy compression types. Default is 75. |
(11). Property AP_PROP_GRAYSCALE |
This property can be using to set grayscale image. |
TRUE(1): It is to set grayscale image. | |
FALSE(0): It is to set non-grayscale image. |
(12). Property AP_PROP_MULTIPAGES |
This property can be using to set multipages tiff files. |
TRUE(1): It is to set multipages tiff files. | |
FALSE(0): It is to set general tiff files. |
(13). Property AP_PROP_PAGECOUNT |
This property can be using to get the number of pages in the PDF document. |
(14). Property AP_PROP_PAGEWIDTH |
This property can be using to get the width of a pdf page. Afert the functon apConvertPage() or apConvertPageToStream() is invoked successful, this property will become valid. |
(15). Property AP_PROP_PAGEHEIGHT |
This property can be using to get the height of a pdf page. Afert the functon apConvertPage() or apConvertPageToStream() is invoked successful, this property will become valid. |
(16). Property AP_PROP_PROGRESSFUNC |
Address of the progress call-back function. |
8. How to ... |
(1) How to create multipages tiff images? |
The TIFF image format is a especial image format, which supports multipages images. Using PDF to TIFF SDK to create multipages tiff images is very easy. All you need to is setting the multipages property of the converter which created by function---apOpen to TRUE(or 1). |
The VB code looks like the following. |
apSetProperty nHandle, AP_PROP_MULTIPAGES, "", 1, 0 |
The VC code looks like the following. |
apSetProperty(nHandle, AP_PROP_MULTIPAGES, NULL, TRUE, 0); |
A completed code for creating multipages tiff in VB. |
Dim nHandle As Long |
Notice: For more detial samples please here to download PDF to TIFF SDK samples. |
(2) How to create memory stream images? |
The Pdf to TIFF SDK supports to convert pdf file to memory stream. You can save the memory stream to database, to file, or to others, etc. |
The following is a VB sample that save the memory stream to file. |
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) |
Notice: For more detial samples please here to download PDF to TIFF SDK samples. |
(3) How to increase/decrease the file size of an image? |
This section will tell you how to increase/decrease the file size of an image. The main factors on which the file size of an image defpend are listed at the following: |
Page zoom | |
Resolution (DPI) | |
Dimensions(width and height) | |
Bits per pixel | |
Compression type | |
Compression quality |
So you can control image's zoom scale with adjusting the value of above parameters. |
The Page zoom is used to set zoom scale of PDF pages(10-200). For example, if it sets the page zoom as 120 or 80 and the result image is a 800x600 pixel, so the final result image is a 960x720 pixel or 640x480 pixel image. Default page zoom is 100. |
To set page zoom like this: | |
apSetProperty(nHandle, AP_PROP_PAGEZOOM, "", 120, 0) |
The DPI(dots per inch) value let you specify how detialed the image is. A larger DPI value generates a more detialed image, but also will make the size of the image file larger. On the other hand, a lower DPI value generates files of smaller size, but the image is also of lower quality.The system supports from 72 to 500 DPI, default is 120 DPI. |
To set resolution like this: | |
apSetProperty(nHandle, AP_PROP_XDPI, "", 150, 0) apSetProperty(nHandle, AP_PROP_YDPI, "", 150, 0) |
The dimensions of an image can be set in pixel. By setting the dimensions of an image, you can specify the width or height of the final result image in pixel. Increasing/Decreasing the dimensions will affect the amount of total pixel. Obviously a 1024x768 pixel image has a larger file size and more detialed than a 800x600 pixel image. |
To set the dimensions of an image like this: | |
apSetProperty(nHandle, AP_PROP_XDIMENSIONS, "", 1024, 0) apSetProperty(nHandle, AP_PROP_YDIMENSIONS, "", 768, 0) |
Setting the color depths of an image, you can adjust the image's size as you like. Such as 1-bit(black/white), 4-bits or 8-bits grayscale instead of 24-bits true color will reduce the size of the image files, but not all formats support all color depths. |
To set bits count per pixel like this: | |
apSetProperty(nHandle, AP_PROP_BITCOUNT, "", 8, 0) |
An appropriated compression type generates a more smaller size of image files. A larger compression quality generates a more detialed image, but also will make the size of the image file larger. On the other hand, a lower compression quality generates file of smaller size, but the image is also of lower quality. The system supports from 1 to 100 quality, default is 75. |
To set compression type like this: | |
apSetProperty(nHandle, AP_PROP_COMPRESSION, "", AP_TIFF_COMPRESSION_LZW, 0) | |
To set compression quality like this: (only the type of image is jpeg, or tiff which encoded by jpeg compression.) |
|
apSetProperty(nHandle, AP_PROP_QUALITY, "", 65, 0) |
Notice: For more detial samples please here to download PDF to TIFF SDK samples. |
9. Registration |
(1) Demo version |
You can free download a demo version at http://www.adultpdf.com/products/pdftotiff/index.html |
Limitations of the demo version: You are allowed to process only up to 10 pages of each pdf files simultaneously. |
(2) Buy now |
You can order Pdf to Tiff SDK online. Click here to the product site. 。Pdf to Tiff SDK 10threads, only $199, buy now. 。Pdf to Tiff SDK 10+threads, only $299, buy now. Click Client License to read the sdk license, thanks for your support. |
(3) Technology support |
Guarantee: We are committed to providing excellent products and support to our customers. If you are dissatisfied with a adultpdf product after your purchase, we will refund your money. Privacy Policy: We will not give, sell or otherwise transfer your personal information to third parties. Unless you ask us not to, we will send occasional email about new products and releases. Ongoing Open Dialog: Our customers are our most valuable resource. Please let us know how we can improve our products and we will try our best to implement your suggestions. |
If you have some questions about
registering our product(s),or programe bugs,or suggestions of our product(s),or suggestions of our site,we will welcome you to contact us. Our sales email: sales@adultpdf.com Our support email: support@adultpdf.com |
10. Copyright&License |
|
http://www.adultpdf.com |
Copyright 2000-2009 by AdultPDF Technology, Inc. All rights reserved. |