Page 1 of 1
PDF generation from tiff, jpeg...
Posted: Mon Nov 12, 2007 11:43 am
by dominique
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
Re: PDF generation from tiff, jpeg...
Posted: Mon Nov 12, 2007 3:01 pm
by xnview
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
Do you change the Compression?
Posted: Mon Nov 12, 2007 3:19 pm
by dominique
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 !
Posted: Mon Nov 12, 2007 3:47 pm
by dominique
Here is an exemple of who I do :
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();
May it can show you my mistake!
Posted: Tue Nov 13, 2007 8:37 am
by xnview
Ok, right. Please send me your email by PM, i would like to send you a fixed version...
Posted: Tue Nov 13, 2007 1:29 pm
by dominique
Problem solved with your modifications (library correction sent by e-mail)
Thank you!
PS : Thx to the GFL team for this lib!