Print Page | Close Window

RenderPageToFile and low Quality of text

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3480
Printed Date: 02 May 24 at 12:31AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: RenderPageToFile and low Quality of text
Posted By: Quick PDF user_12
Subject: RenderPageToFile and low Quality of text
Date Posted: 30 Jun 17 at 9:11AM
Hello all. I have an issue - or I do not understand what I am doing wrong in the following case.

I have new PDF page with added text (Calibri 7 or any other small font) and a datmatrix code (very small)

Please find code and output bmp here : http://i63.tinypic.com/23uekc5.jpg

Is there any way to get proper BMP with good quality on 72dpi ? 

Or can anyone explain me what I doing wrong - or ... 

How it should works ? What shall i do to get 100% same quality with orginal PDF. 

I wish to have black and white text without missing pixels - because i have to use output BMP 1:1 size to print it on Ink printer so it have to be small resolution of BMP.

I can't make for example - bigger BMP with 300 DPI - because after resize to 72 dpi i will get output with lossed pixels.

So is there any way to get 100% good quality output BMP same as input PDF ?

You can find source code below...

QPDF TEST



Replies:
Posted By: Quick PDF user_12
Date Posted: 30 Jun 17 at 9:15AM
And more - Ink printer is not a normal printer. It's a custom machine without any way to send PDF to a printer - so this is a reason to send BMP (then i have to convert BMP file to TCP/IP frame) so there is no way to do this in other way.


Posted By: Ingo
Date Posted: 30 Jun 17 at 6:29PM
Make sure that the GDI+-library is used:
http://www.debenu.com/docs/pdf_library_reference/SetGDIPlusFileName.php
What are the returning values of your used GDI+function?
Do they find the library?



-------------
Cheers,
Ingo



Posted By: Quick PDF user_12
Date Posted: 30 Jun 17 at 11:34PM
After SetGDIPlusFileName is same. I got "1" - so the function found dll library in my path.

Could You look at SetPageDimension in last line ? Because I need various size of page - so now is 1000x500 - Maybe this is the reason of bad quality ? 

Code below.
pdflibrary1:=TQuickPDF.Create;
pdflibrary1.UnlockKey(full_version_key);

pdflibrary1.SetGDIPlusFileName('C:\dlls\gdiplus.dll');

pdflibrary1.SetGDIPlusOptions(0,1); //use GDI
pdflibrary1.SetGDIPlusOptions(1,0); // no smothng
pdflibrary1.SetGDIPlusOptions(2,1); // interpolation 0 - standard
pdflibrary1.SetGDIPlusOptions(3,0); // no smothng
pdflibrary1.SetPageDimensions(1000,500);


Posted By: Ingo
Date Posted: 01 Jul 17 at 12:43PM
SetPageDimensions can change the dimensions but this should be always with the correct scaling.
You've wriiten about bmp... the bitmap-object offers the original dimensions and if you want to change the diemnsions you have to calculate the original values up or down.



-------------
Cheers,
Ingo



Posted By: Quick PDF user_12
Date Posted: 11 Jul 17 at 1:51PM
I don't understand.

So what is proper width and height to get good quality of output bmp ?

I wish 72Dpi. Please Check my calculations below:


I have a work area about 393,7 X 196,8 mm

393,7 x 2,54 = ~1000
195,8 x 2,54 = ~500

to get proper (inch to pixel) value.

Could You show me some example - to draw text (any font - 10 size) and render it to bitmap ?

I think I dont understand how to calculate proper dimmensions.


Posted By: Ingo
Date Posted: 11 Jul 17 at 8:51PM
what i wanna try to tell is that you shouldn't change the aspect ration when rendering.
72 dpi is standard pdf and won't lead to a good image quality.
You can try up to 300 dpi... More can lead to memory probs.
Starting from www.quickpdf.org you can search for sample code.
You can look here in the samples section,too.




-------------
Cheers,
Ingo




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk