Print Page | Close Window

[Vb6] Print Image load on PictureBox

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=2198
Printed Date: 25 Nov 24 at 8:04PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: [Vb6] Print Image load on PictureBox
Posted By: Cuspide
Subject: [Vb6] Print Image load on PictureBox
Date Posted: 26 Mar 12 at 10:39AM
Hi,
I need to print an image loaded within a PictureBox

In vb6 to print I executed:

Printer.PaintPicture Sez1, 14, 106, 5, 54

In QuickPDF how can I do ?

Thanks
Daniele



Replies:
Posted By: jpbro
Date Posted: 26 Mar 12 at 3:29PM
You can do something like this:


   Dim l_ImageId As Long
  
   SavePicture Sez1.Picture, App.Path & "\embed.jpg"
  
   l_ImageId = Qpdf.AddImageFromFile(App.Path & "\embed.jpg", 0)
   If l_ImageId = 0 Then
      Debug.Assert False
   Else
      Qpdf.SetOrigin 1
      Qpdf.DrawImage 10, 10, 100, 100
   End If


I'm not aware of any way to get StdPicture into QPDF directly without using the intermediary file or some additional code/external DLL to convert StdPictures to byte arrays, but it may exist in QPDF and I'm just not familiar with it.



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