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!
Rendering to DC in virtual PC environment |
Post Reply |
Author | ||||
AndrewH
Beginner Joined: 27 Jul 18 Location: UK Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 27 Jul 18 at 10:36AM |
|||
Using DebenuPDFLibraryDLL1411 with C++
We are print previewing the PDF and hence rendering the PDF to DC by calling: DebenuPDFLibraryRenderPageToDC(int, double, int, HDC); this works fine when running on your own PC using the graphics drivers on the PC. However, when running our software in a virtual environment the image quality of the PDF is not anywhere near as clear and crisp. Is there anything we can set call in the Debenu PDF Library that can resolve this?
|
||||
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
|||
What are you using to view the screen of the VM for the preview? Remote Desktop? VNC? Teamviewer? Something else? Is this remote software scaling the image, and have you experimented with adjusting this? You could also try rendering to a PNG file with appropriate scaling and resolution and displaying that instead.
|
||||
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
|||
Hi Andrew,
welcome here in the forum. Perhaps the described behavior has to do with the settings of the vm? The virtuell graphic memory could be too small. Are the same dlls in the vm-system as in the real pc? |
||||
Cheers,
Ingo |
||||
AndrewH
Beginner Joined: 27 Jul 18 Location: UK Status: Offline Points: 4 |
Post Options
Thanks(0)
|
|||
Thanks for the replies, spoken to our systems admin and he says that it's not down to the VM's but RDP/Citrix. If he RDP's to another PC they get the same problem! He is adamant the problem is located in the print preview code.
|
||||
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
|||
What are you putting into DPI? And does it match the VM's virtual DPI? And does the virtual DPI change depending on how you log in to the VM? And how do you create the device context? Have you used SetRenderScale? The code you show is very unlikely to be the source of the problem. We render PDF to an image, as I said, and then display the image, making it as crisp and clear when viewed in a VM over RDP as it is when running and displaying on the local screen. You should be able to mismatch the settings deliberately on your local machine and reproduce the problem there to prove that this is the cause.
However it occurs to me that since you are using C++, you may be limited to creating and using a device context when you come to displaying an image file anyway, so my suggestion would not help. The advantage of Delphi is that the VCL and third party libraries give you complete control over image scaling and rendering. If you use raw Windows device contexts you are subject to all sorts of influences which need to be taken into account and which may not be under your control.
|
||||
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
|||
One other issue: is the OS the same in the VM as on the local machine and are the OS scaling settings the same? Recent versions of Windows treat scaling differently and may require adjustments to your application manifest.
|
||||
AndrewH
Beginner Joined: 27 Jul 18 Location: UK Status: Offline Points: 4 |
Post Options
Thanks(0)
|
|||
Creating a Print Preview DC, and yes we are calling SetRenderScale
|
||||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store