User login

Who's online

There are currently 0 users and 130 guests online.

Advertisements


SourceForge.net Logo

B&W and greyscale pdf error

Submitted by palaman on Tue, 2007-02-27 14:12.

hi, i'm writing an utility to scan documents thru twain then convert them to pdf with fly2pdf. With color images it does work perfectly but with B&W/Grayscale ones i'm having troubles. fly2pdf creates the PDF but when I gonna open it, Adobe acrobat reader show an error indicating (in spanish) "Datos insuficientes para una imagen" (in english somethin like this: "Insufficient data for an image") and a blank document appears (the pdf contains nothing but images). I pointed into this function:

docContent.Image strFileNames(i), xImage, yImage, wImage, hImage, , FileConfig.defDirectMethod

strFilenames(i) sets the file (bucle)
FileConfig.defDirectMethod is boolean var, if set "True", creating pdf works very fast (with color mode, 280KB one A4 at 150 DPI color); if set "True" but with B&W/greyscale images it Fails with previously mentioned error at reader opening file; and if set "False" created pdf are VERY big (around 12MB one A4 at 150 dpi B&W).

Why do this occurs? some idea?

(Note: I'm generating images as JPG)

sorry about my english

Submitted by palaman on Thu, 2007-03-01 17:15.

I've tested with both direct and "normal" (true or false).

Also I tried with sample tests. In fact, with example named "20 - Images2PDF" -> I copied that-bad jpg into "..\resources\images" directory then tested again. The test generates PDF file -> Open it then pgDown (images into each page shows correctly) to page contains bad image, then error shows in that page. All the pages but one containing "bad jpg" are ok. It means app fails with "official" tests too.

Give me your email and I'll send you an image to test yourself.

Thanks again.

© 2006 by pdfforge.org :: Contact us

Validate XHTML or CSS.