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 - LoadFromCanvasDC
  FAQ FAQ  Forum Search   Register Register  Login Login

LoadFromCanvasDC

 Post Reply Post Reply
Author
Message
Jan View Drop Down
Beginner
Beginner


Joined: 24 May 10
Location: Czech Republic
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jan Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
mulfycrowh View Drop Down
Beginner
Beginner


Joined: 03 May 10
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote mulfycrowh Quote  Post ReplyReply Direct Link To This Post 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  !
Back to Top
Jan View Drop Down
Beginner
Beginner


Joined: 24 May 10
Location: Czech Republic
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jan Quote  Post ReplyReply Direct Link To This Post 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.
 

protected override void OnPaint(PaintEventArgs e)

{

Graphics g = 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());

}
 
 
 
Back to Top
Jan View Drop Down
Beginner
Beginner


Joined: 24 May 10
Location: Czech Republic
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jan Quote  Post ReplyReply Direct Link To This Post 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.

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