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 : Wednesday, August 11, 2010 12:21:26 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


hello

I get the multi-pdf flie by scanning,like this:
_codecs.Options.Pdf.Save.UseImageResolution = True
_codecs.Save(e.Image, filename, RasterImageFormat.RasPdfG4, 1, 1, 1, 1, CodecsSavePageMode.Append)

Then I Rotated the image in viewer,and then save one of it again,like this:
Dim listItem As RasterImageListItem = _thumb.SelectedItems(0)
_codecs.Options.Pdf.Save.UseImageResolution = True
_codecs.Save(listItem.Image, filename, RasterImageFormat.RasPdfG4, 1, listItem.Page, listItem.Page, listItem.Page, CodecsSavePageMode.Replace)

The original size is 845kb,and the re-saved size is 2949kb.The more I saved it,the more it increased.
Could you tell me how can I retain the size after saving it?
Thank you.
 

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 : Wednesday, August 11, 2010 1:08:27 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Can you send me a small working project (NOT your full application) with minimum code required that shows how exactly are you loading, rotating and saving your PDF file? Also, that shows the rotation degree you are using to rotate your PDFs.
If you create such a project, please make sure to put it in a ZIP or RAR file before posting it here.
 
#3 Posted : Wednesday, August 11, 2010 2:14:57 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


OK.I have send the sample in my project.

I use the save method in the DragDrop(),RotateLeft(),RotateRight() and DeskewCheckCommandExample() functions.
The pdf file which I saved from the scanner is also send.

Thank you.
File Attachment(s):
sample.zip (763kb) downloaded 36 time(s).
 
#4 Posted : Thursday, August 12, 2010 12:51:06 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Since you are using the CodecsSavePageMode.Replace flag in the Save method, the file size will continue to grow every time you call the Save method because the original pages in your file are not physically deleted.
This is how the Replace operation works with PDF files. The old page is marked as 'deleted', but it remains in the file.
To solve this issue:
1- Change the output file name and use the CodecsSavePageMode.Overwrite flag to save the first page.
2- After that use the CodecsSavePageMode.Append to add the other pages to your new file.
 
#5 Posted : Friday, August 13, 2010 3:22:39 AM(UTC)

qujian  
qujian

Groups: Registered
Posts: 8


Thank you.

But when lots of images in this multi-file,it has to save the all images again when I only modify the one of these.It seems too slow to save it.

How can I save this multi-file quickly ?
 
#6 Posted : Sunday, August 15, 2010 1:38:54 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

For PDF files, this is the way to save all the pages even after modifying one page of the file.

With multi-page TIFF files, you can use the CompactFile method enables you to copy or extract one or more pages from a TIFF file and copy them without recompression to another TIFF file.
If you like I can submit a feature to our engineers to add similar function for PDF file format. To add the feature, please send me the following info to support@leadtools.com from a valid email address:
- Your LEADTOOLS toolkit serial number. (Do NOT post it here)
- A link to this forum post.
 
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.128 seconds.