Print Page | Close Window

Synchronize Canvas Text with Adobe 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=2210
Printed Date: 17 Jun 25 at 7:16AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Synchronize Canvas Text with Adobe Text
Posted By: fargburger
Subject: Synchronize Canvas Text with Adobe Text
Date Posted: 03 Apr 12 at 4:41PM
Can anyone help me figure out why the drawing text on a PDF (Left) looks different than drawing to a canvas using RenderPageToDC (Right).

This is the same information - the page on the right, if saved to a PDF (using SaveToFile) would open in acrobat reader looking like the page on the left.



So, I'll post all the sample code you want, there's just a lot of code behind it and I don't know where to start.



Replies:
Posted By: fargburger
Date Posted: 03 Apr 12 at 6:47PM
Aha.  well problem found - don't know how I'm going to fix it though.

  QuickPDF.SetTextScaling(95);
  QuickPDF.SetTextWordSpacing(-1);



Posted By: AndrewC
Date Posted: 04 Apr 12 at 4:02AM
You images is not showing up so it is hard to comment.

Andrew.


Posted By: Wheeley
Date Posted: 05 Apr 12 at 2:56AM
Andrew,
I see the images just fine in the latest version of Firefox. Maybe its your browser's settings.

Wheeley


Posted By: fargburger
Date Posted: 13 Apr 12 at 7:01PM
So does anyone know if it's a known issue regarding SetTextScaling not looking the same on the Delphi canvas vs. a PDF?   That's pretty much the biggest gripe I've got with QuickPDF right now.


Posted By: AndrewC
Date Posted: 16 Apr 12 at 5:24AM
I believe this has been fixed in the 8.15 Betas.

            QP.SetTextSize(72);
            QP.DrawText(100, 100, "Hello World");

            QP.SetTextScaling(95);
            QP.SetTextWordSpacing(-1);

            QP.DrawText(100, 200, "Hello World");
            QP.SaveToFile("out.pdf");

If I call RenderPageToDC then the strings are of a different length which is expected and the output now matches the RenderPageToFile output.

Andrew.




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