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!
|  | 
| LoadFromCanvasDC | 
| Post Reply   | 
| Author | |
| Jan   Beginner   Joined: 24 May 10 Location: Czech Republic Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Topic: LoadFromCanvasDC Posted: 24 May 10 at 1:21PM | 
| 
   Hi, 
 let me ask: Is any way to use another canvasDC than canvas create with  GetCanvasDC? I have a program for printing. I use GDI+ from .NET.  From this same data I can generate a PDF file using command from PDF library with another program.  If had been able use a PaintEventArgs.Graphics (exactly PaintEventArgs.Graphics.GetHdc()) as a canvas instead of GetCanvasDC - I could have only one  program. Thanks! Jan | |
|  | |
| mulfycrowh   Beginner   Joined: 03 May 10 Status: Offline Points: 18 |  Post Options  Thanks(0)  Quote  Reply  Posted: 29 May 10 at 6:50AM | 
| 
   Hi !
 Before purchasing the library, I would like to render a PDF file on the screen. I have been building my project under VC++ and DirectX. I asked many questions to know how to render under DirectX. I was told by technical support it would be better to use GDI+. Well, I am trying to do so. Do you have any sample under GDI+ ? Many Thanks  ! | |
|  | |
| Jan   Beginner   Joined: 24 May 10 Location: Czech Republic Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 May 10 at 7:50AM | 
| 
   Hi!
 I make only one attempt to rendering PDF on screen with Quick PDF library. I easy overwrite Form1.OnPanit procedure. This is not correct using rendering, this only show me, that rendering with library is possible. protectedoverride void OnPaint(PaintEventArgs e) { Graphicsg = e.Graphics; 
/* Rendering with s QuickPDF */
string fileName = @"c:\temp\file_to_render.pdf";
string fileVystup = @"c:\temp\fromQuickPDF.pdf";
string licenseKey = "<your licence key>"; 
 int vysledek;int FileHandle;
// Create the library. A blank document is automatically created at this point
PDFLibrary qp = new PDFLibrary("C:\\Program Files\\Quick PDF Library\\DLL\\QuickPDFDLL0719.dll");
// Unlock the library qp.UnlockKey(licenseKey);// Check to see if the library has been successfully unlocked if (qp.Unlocked() == 1) {// open file FileHandle = qp.DAOpenFileReadOnly(fileName, "");// rendering file vysledek = qp.DARenderPageToDC(FileHandle, qp.DAFindPage(FileHandle, 1), 100, g.GetHdc().ToInt32());
} | |
|  | |
| Jan   Beginner   Joined: 24 May 10 Location: Czech Republic Status: Offline Points: 14 |  Post Options  Thanks(0)  Quote  Reply  Posted: 31 May 10 at 7:59AM | 
| 
   May be, that I wrong understand what you want...
 When you ask for rendering graphics using GDI+ , that my answer is no. Every my attempt to render graphics with GDI+ and than save it as PDF fault. I have only example with make grafics using gdi32.dll library and then save this to PDF file using 
 LoadFromCanvasDC and SaveToFile. | |
|  | |
| 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