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, May 6, 2015 3:48:21 AM(UTC)

alex78  
alex78

Groups: Registered
Posts: 11


Hello guys,

if i am converting a black/white  PDF/A to Tiff#s i am getting a problem with the quality of the image. Is there a way to get a better quality?
File Attachment(s):
test.zip (163kb) downloaded 27 time(s).
 

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, May 6, 2015 6:00:01 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Alex,
I have tested using the latest LEADTOOLS  v19  setup with the following code and I got the attached results:
====================
string filepath = @"E:\PDF150.pdf";
RasterCodecs codecs = new RasterCodecs();
RasterImage img = codecs.Load(filepath,0,CodecsLoadByteOrder.BgrOrGray,1,5);
codecs.Save(img, @"E:\Converted_To_TIFF.tif", RasterImageFormat.TifLzw, 8);
====================

If you use the same code, do you see the issue? If yes, which version of LEADTOOLS are you using? What is the "File version" (Right-click->Properties-> Details tab) of Leadtools.dll that you have?

File Attachment(s):
LT19_Converted_TIF.zip (234kb) downloaded 27 time(s).
 
#3 Posted : Wednesday, May 6, 2015 11:11:58 PM(UTC)

alex78  
alex78

Groups: Registered
Posts: 11


Hello Daoud,

string loadfile= @"E:\PDF150.pdf";
string outfiles= @"E:\newTEST\{0}.tiff";

RasterCodecs codecs = new RasterCodecs();
RasterImage img = codecs.Load(
loadfile,0,CodecsLoadByteOrder.BgrOrGray,1,5);


CodecsImageInfo imgInfo = codecs.GetInformation(loadfile, true);
int count = imgInfo.TotalPages;
for (int i = 1; i <= count; i++)
{
             codecs.Save(image, string.Format(outfiles, i), RasterImageFormat.TifLzw, 1, i, i, i, CodecsSavePageMode.Append);

}


i am creating for each page in the pdf/a a tiff file. No multipage tiff. the versions i use is 14.5 and 16.5 but if it does work in 14.5 it is better for us. Because this version is in our software.
The quality isn't really better if you look at 3.tiff.
File Attachment(s):
test.zip (163kb) downloaded 27 time(s).
 
#4 Posted : Thursday, May 7, 2015 7:19:55 AM(UTC)

Daoud  
Daoud

Groups: Registered
Posts: 256


Alex,

I have specified the loading DPI of the PDF and got the attached image which has better quality than yours.

Before calling codecs.Load() add the following lines:

codecs.Options.Pdf.Load.XResolution = 450;

codecs.Options.Pdf.Load.YResolution = 450;
File Attachment(s):
3_450_DPI.zip (131kb) downloaded 27 time(s).
 
#5 Posted : Thursday, May 7, 2015 10:10:14 PM(UTC)

alex78  
alex78

Groups: Registered
Posts: 11


Ok thank you it's now working good
 
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-2019, Yet Another Forum.NET
This page was generated in 0.168 seconds.