Print Page | Close Window

C# SetGDIPlusOptions has no effect?

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=2303
Printed Date: 16 Feb 26 at 3:04AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: C# SetGDIPlusOptions has no effect?
Posted By: murpium
Subject: C# SetGDIPlusOptions has no effect?
Date Posted: 15 Jun 12 at 4:30PM
I do not see a difference when setting any of the options provided by SetGDIPlusOptions

For instance, according to  http://www.quickpdflibrary.com/help/quickpdf/SetGDIPlusOptions.php - http://www.quickpdflibrary.com/help/quickpdf/SetGDIPlusOptions.php  ,
SetGDIPlusOptions(3,1) should turn Image smoothing on.
SetGDIPlusOptions(2, 0) should change interpolation from the default of 1 (for accurate) to 0 (for standard).

When I execute DARenderPageToFile to create a TIFF or G4 TIFF, I see no difference in the output TIFF no matter which of these options I change. Running on Windows 7. I assume GDI+ is being used for the rendering but I do not know how to tell. Or perhaps I don't have the correct understanding of what SetGDIPlusOptions actually does. Perhaps these settings do not apply to TIFFs?



Replies:
Posted By: Ingo
Date Posted: 15 Jun 12 at 7:02PM
It depends on your win-version.
Not all win-versions work with gdiplus.
Here are threads regarding this fact.
Try the search function here (at the top, right).

Cheers, Ingo



Posted By: murpium
Date Posted: 15 Jun 12 at 7:57PM
Ingo,

I have used the search function. In fact, a search for "SetGDIPlusOptions" returns nothing but my post here. Looks like no one has asked about this function before.

Documentation claims that Windows Vista and Server 2008 and up should have GDI+ and be able to do it. GDI+ is on this computer because I can use option 10 on DARenderPageToFile to create a G4 TIFF, a feature that appears to only work with the updated version of GDI+ available on Windows Vista and up.

So my question remains, why does SetGDIPlusOptions appear to do nothing at all?


Posted By: Ingo
Date Posted: 15 Jun 12 at 10:00PM
Hi Murpi!

On this page at the top, right side: "Advanced search"
with gdi and xp as searchstrings...

Cheers, Ingo



Posted By: AndrewC
Date Posted: 18 Jun 12 at 10:13AM

The GDIPlusOptions were better supported in the older version of QPL.  Over time the need to use them has been reduced as we automatically turn some of these options on and off depending on what we are rendering.  ie.  Antialiasing is turned off when drawing images otherwise tiled images look dreadful.  We have optimised the rendering to give the best performance vs speed when using GDI+.  

GDI+ is not the easiest graphics library to use for a PDF renderer and settings have to be tweaked dynamically to attain the best output results.

Here is my understanding of where each option stands - I would need to review the code to confirm.

Option 1 - now defaults to the optimal rendering to make text readable at all sizes.
Option 2 - ?
Option 3 - most likely redundant now.
Option 4 should not be used as it causes strange behaviour with some PDFs.
Option 5 only works with RenderPageToFile type functions when using option 10 to export Group 4 tiff. Only works in GDI+ 1.1 - ie  Win7, Vista, Server 2008.  It doesn't work on XP or Server 2003.

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