#ifndef __HGPDF_H__ #define __HGPDF_H__ #include "../base/HGDef.h" #include "../base/HGBaseErr.h" #include "HGImgFmtErr.h" #include "../base/HGImage.h" #include "HGJpeg.h" HG_DECLARE_HANDLE(HGPdfReader); HG_DECLARE_HANDLE(HGPdfImageWriter); typedef struct { HGUInt width; HGUInt height; }HGPdfPageInfo; HGEXPORT HGResult HGAPI HGImgFmt_CheckPdfFile(const HGChar* fileName, HGBool* isPdf); HGEXPORT HGResult HGAPI HGImgFmt_OpenPdfReader(const HGChar* fileName, HGPdfReader* reader); HGEXPORT HGResult HGAPI HGImgFmt_ClosePdfReader(HGPdfReader reader); HGEXPORT HGResult HGAPI HGImgFmt_GetPdfPageCount(HGPdfReader reader, HGUInt* count); HGEXPORT HGResult HGAPI HGImgFmt_GetPdfPageInfo(HGPdfReader reader, HGUInt page, HGPdfPageInfo *info); HGEXPORT HGResult HGAPI HGImgFmt_LoadImageFromPdfReader(HGPdfReader reader, HGUInt page, HGFloat xScale, HGFloat yScale, HGUInt imgType, HGUInt imgOrigin, HGImage* image); HGEXPORT HGResult HGAPI HGImgFmt_OpenPdfImageWriter(const HGChar* fileName, HGPdfImageWriter* writer); HGEXPORT HGResult HGAPI HGImgFmt_ClosePdfImageWriter(HGPdfImageWriter writer); HGEXPORT HGResult HGAPI HGImgFmt_SaveJpegImageToPdfImageWriter(HGPdfImageWriter writer, HGImage image, const HGJpegSaveInfo* info, HGUInt quality); #endif /* __HGPDF_H__ */