PDFCOMPOPTIONS

typedef struct _PDFCOMPOPTIONS 
{ 
   L_UINT uStructSize; 
   L_UINT32 dwFlags; 
   PDFCOMP_IMAGEQUALITY imageQuality; 
   PDFCOMP_OUTPUTQUALITY outputQuality; 
   L_UINT uCleanSize; 
   L_UINT uBackGroundThreshold; 
   L_UINT uCombineThreshold; 
   L_UINT uSegmentQuality; 
   L_UINT uColorThreshold; 
} PDFCOMPOPTIONS,   * LPPDFCOMPOPTIONS; 

The PDFCOMPOPTIONS structure provides information about PDF Compressor options.

Member Description
uStructSize Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
dwFlags Flag that indicates the PDF Compressor options behavior. Possible values are:
  Value Meaning
  PDFCOMP_FAVOR_ONEBIT [0x00] Favor the detection of 1-bit segments.
  PDFCOMP_FAVOR_TWOBIT [0x01] Favor the detection of 2-bit segments.
  PDFCOMP_FORCE_ONEBIT [0x02] Force all 2-bit segments to be 1-bit.
  PDFCOMP_FORCE_TWOBIT [0x03] Force all 1-bit segments to be 2-bit.
  PDFCOMP_WITH_BACKGROUND [0x00] Detect background segments.
  PDFCOMP_WITHOUT_BACKGROUND [0x10] Dont detect background segments.

 

imageQuality Value that indicates the bitmap's quality before processing. Possible values are:
  Value Meaning
  PDFCOMP_IMAGEQUALITY_UNKNOWN [0] Unknown image quality. Use default handling.
  PDFCOMP_IMAGEQUALITY_NOISY [1] The source image is noisy.
  PDFCOMP_IMAGEQUALITY_SCANNED [2] The source image is a scanned image.
  PDFCOMP_IMAGEQUALITY_PRINTED [3] The source image is a printed document.
  PDFCOMP_IMAGEQUALITY_COMPUTER_GENERATED [4] The source image is a high quality computer-generated image.
  PDFCOMP_IMAGEQUALITY_PHOTO [5] The source image is a high quality photo image; for example, from a digital camera .
  PDFCOMP_IMAGEQUALITY_USER [6] The quality is set manually. This flag is for advanced users.

 

outputQuality Value that indicates the image's output quality. Possible values are:
  Value Meaning
  PDFCOMP_OUTPUTQUALITY_AUTO [0] Choose the quality of the output automatically.
  PDFCOMP_OUTPUTQUALITY_POOR [1] Poor output quality with best compression.
  PDFCOMP_OUTPUTQUALITY_AVERAGE [2] Average output quality with average compression.
  PDFCOMP_OUTPUTQUALITY_GOOD [3] Good output quality with good compression.
  PDFCOMP_OUTPUTQUALITY_EXCELLENT [4] Excellent output quality with poor compression.
  PDFCOMP_OUTPUTQUALITY_USER [5] The user detects the output quality. This flag is for advanced users.
uCleanSize Value that indicates the size of the area used to remove the noise inside the segmented image. Possible values range from 0 to 10, where 0 means skip the cleaning stage.
uBackGroundThreshold Threshold value used to separate image objects from the background. Best values are from 5 to 35.
uCombineThreshold Threshold value used to combine colors. Colors that are closer together than this amount will be combined. The best value is 25. Values saturate at 443.
uSegmentQuality Threshold value used to determine whether the segment is a picture segment. Possible values range from 0 to 100. Use 0 to set all possible picture segments to 2-bit without losing a lot of information. Use 100 to set all picture segments to 2-bit only if they are very close to 2-bit.
uColorThreshold Threshold value used to merge segments. Best values are from 75 to 125.

Comments

LPPDFCOMPOPTIONS is a pointer to a PDFCOMPOPTIONS structure. Where a function parameter type is LPPDFCOMPOPTIONS, declare a PDFCOMPOPTIONS variable and pass the variable's address in the parameter. Declaring an LPPDFCOMPOPTIONS variable is necessary only if the program requires a pointer.

The values of uCleanSize, uBackGroundThreshold and uCombineThreshold are valid only if the imageQuality is set to PDFCOMP_IMAGEQUALITY_USER flag.

The values of uSegmentQuality and uColorThreshold are valid only if the outputQuality is set to PDFCOMP_OUTPUTQUALITY_USER flag.

This structure is used with the LPDFCompressor::InsertMRC function.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS MRC C++ Class Library Help