LEADTOOLS Support
Document
Document SDK Questions
Quality Problem after conversion PDF/A to Image
#1
Posted
:
Wednesday, May 6, 2015 3:43:21 AM(UTC)
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?
#2
Posted
:
Wednesday, May 6, 2015 5:55:01 AM(UTC)
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?
#3
Posted
:
Wednesday, May 6, 2015 11:06:58 PM(UTC)
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.
#4
Posted
:
Thursday, May 7, 2015 7:14:55 AM(UTC)
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;
#5
Posted
:
Thursday, May 7, 2015 10:05:14 PM(UTC)
Groups: Registered
Posts: 11
Ok thank you it's now working good
LEADTOOLS Support
Document
Document SDK Questions
Quality Problem after conversion PDF/A to Image
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.