Hi GFLSDK Team and friends,
I 'm testing translation from Jpeg or Tiff images to PDF format.
My objective is to save PDF with JPEG 80 encapsulated images for example.
If input image format is JPEG or TIFF, SDK saves PDF using TIFF LZW compression with no respect of save options.
If I do the same (with identical save options) from PDF input, SDK works fine respecting save options!
Even if save option structure seems to be ok (I use : FormatIndex, Compression and Quality), I think I miss something in options but don't see witch parameters.
Someone to help?
Rgds
PDF generation from tiff, jpeg...
Moderators: helmut, XnTriq, xnview
Re: PDF generation from tiff, jpeg...
Do you change the Compression?dominique wrote:Hi GFLSDK Team and friends,
I 'm testing translation from Jpeg or Tiff images to PDF format.
My objective is to save PDF with JPEG 80 encapsulated images for example.
If input image format is JPEG or TIFF, SDK saves PDF using TIFF LZW compression with no respect of save options.
If I do the same (with identical save options) from PDF input, SDK works fine respecting save options!
Even if save option structure seems to be ok (I use : FormatIndex, Compression and Quality), I think I miss something in options but don't see witch parameters.
Someone to help?
Rgds
Pierre.
Yes I try to Change the Compression method.
With a JPEG or TIFF input :
If I choose No Compression, I have a PDF File which is a little bit bigger than my tiff=> ok that's fine
Same thing with LZW Compression (with a smaller output file).
If I put JPEG Compression with Quality X, the file generated is like a TIFF LZW.
I've compared save options between JPEG source and PDF source with the deboger and every options seems to be the same.
I continue reading Documentation and Forum
Thx for your help !
With a JPEG or TIFF input :
If I choose No Compression, I have a PDF File which is a little bit bigger than my tiff=> ok that's fine
Same thing with LZW Compression (with a smaller output file).
If I put JPEG Compression with Quality X, the file generated is like a TIFF LZW.
I've compared save options between JPEG source and PDF source with the deboger and every options seems to be the same.
I continue reading Documentation and Forum

Thx for your help !
Dom
Here is an exemple of who I do :
May it can show you my mistake!
Code: Select all
GFL_BITMAP *mBitmap;
GFL_FILE_INFORMATION mImageInfo; // Données image
GFL_FORMAT_INFORMATION mFormatInfo; // Données sur le format de l'image
GFL_ERROR mErr; // Code d'erreur
GFL_LOAD_PARAMS mLoadOption; // Options d'ouverture de l'image
GFL_SAVE_PARAMS mSaveOption; // Options d'écriture de l'image
gflLibraryInit();
gflGetDefaultLoadParams( &mLoadOption );
mErr = gflLoadBitmap( "toto.tif", &mBitmap, &mLoadOption, &mImageInfo );
if (!mErr)
{
gflGetDefaultSaveParams(&mSaveOption);
mSaveOption.FormatIndex = 54;
mSaveOption.Compression = GFL_JPEG;
mSaveOption.Quality = 80;
mErr = gflSaveBitmap( "toto.pdf", mBitmap, &mSaveOption);
int toto = 13; // break point
}
gflLibraryExit();
Dom