Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - RenderPageToFile and low Quality of text
  FAQ FAQ  Forum Search   Register Register  Login Login

RenderPageToFile and low Quality of text

 Post Reply Post Reply
Author
Message
Quick PDF user_12 View Drop Down
Beginner
Beginner
Avatar

Joined: 14 Feb 17
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Quick PDF user_12 Quote  Post ReplyReply Direct Link To This Post Topic: RenderPageToFile and low Quality of text
    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


Edited by Quick PDF user_12 - 30 Jun 17 at 9:18AM
Back to Top
Quick PDF user_12 View Drop Down
Beginner
Beginner
Avatar

Joined: 14 Feb 17
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Quick PDF user_12 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Quick PDF user_12 View Drop Down
Beginner
Beginner
Avatar

Joined: 14 Feb 17
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Quick PDF user_12 Quote  Post ReplyReply Direct Link To This Post 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);
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Quick PDF user_12 View Drop Down
Beginner
Beginner
Avatar

Joined: 14 Feb 17
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Quick PDF user_12 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store