Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, January 15, 2009 9:03:35 AM(UTC)

mkpenny  
mkpenny

Groups: Registered
Posts: 4


I have created a web application that scans documents and saves them to a database using lead tools 16. The images are saved as pdf. The problem is that i need the saved data to be smaller.

I do search for barcodes and other proccessing of the scanned image before finally saving. Scans are at a low dpi(typically 200 to ensure barcode read) and are black and white, and still are about 2 MB.

The code i use to covert the image to pdf stream to be saved in to the database:

p_codecs.Save(RawImage, stm, Leadtools.RasterImageFormat.RasPdfJpeg411, 8, 1, RawImage.PageCount, 1, CodecsSavePageMode.Overwrite)

What is the best method to reduce these files sizes? can i convert the rawimage to a gif or somthing then save it as a pdf? I've tried everything i can think of but am out of time. Please advise.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, January 16, 2009 11:09:39 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


You could try some of the other RasPdf[...] formats.  I noticed you're saving as 8bpp.  Are these images black and white?  If so, then you can use RasPdfG4 and save them as 1bpp which will give a much smaller file size.

If you need the grayscale or color and want to use JPEG compression, you can further control the output with the RasterCodecs.Options.Jpeg.Save.QualityFactor property.  A lower value creates larger files with better quality while larger values yield smaller files and lower image quality.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.082 seconds.