GDPicture.NET 8 et Windev

Discussions about GdPicture.NET usage in non managed applications built in vb6, Delphi, vfp, MFC c++ etc...
Post Reply
giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

GDPicture.NET 8 et Windev

Post by giam153 » Wed Feb 01, 2012 11:56 am

Bonjour à tous,

Je voudrais piloter GDPicture .NET 8 sur mon windev 16.
Par contre, je ne connais pas le nom de l'objet Automation.

Pouvez-vous m'aider svp?

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Wed Feb 01, 2012 12:19 pm

English version :

Hello,

I need to use GDPicture .NET 8 with Windev 16.
I could do it with automation object but i don't know the name of that object.

Could you please help me?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Thu Feb 02, 2012 6:00 pm

Bonjour / Hello,

Each object name can be found in the doc, the server name is "GdPicture."

So you can use:

"GdPicture.GdPictureImaging"
"GdPicture.AnnotationManager"
"GdPicture.GdPicturePDF"
"GdPicture.GdViewer"
...

Let me know if you need further information.

Kind regards,

Loïc

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Mon Feb 06, 2012 5:04 pm

Bonjour/Hello,

It works with the good name of the OLE Object but i've another problem when i try to select a source.
He's asking me to give the windows Handle but error orcurrs 'Member does not exist'

Here is my code :

Code: Select all

gdAD est un objet Automation dynamique 
gdAD = allouer un objet Automation "GdPicture.GdPictureImaging"
gdAD>>SetLicenseNumber("xxxxxxxxxxx")

i est un entier = Handle(Fenêtre1)
Info(i)
gdAD>>TwainSelectSource(i)

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Mon Feb 06, 2012 6:38 pm

Heljour,

This is tricky: you are using an overloaded method of the toolkit. In COM overload doesn't exists. So the compiler converted function name to TwainSelectSource(), TwainSelectSource_2().
You should be able to check the function naming by using an object explorer. Unfortunately I don't know how to use such tool in WinDev. A workaround consists to edit the GdPicture.NET.tlb file to see inside...

So in your situation I suppose you have to call:

Code: Select all

gdAD>>TwainSelectSource_2(i)
Hope this helps !

Kind regards,

Loïc

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Mon Feb 06, 2012 7:05 pm

Bonjour,

J'ai l'impression que tu es francais donc parlons en francais.

Effectivement, en ajoutant le "_2", ca fonctionne !!!

Je vais continuer mon developpement et voir si le reste des fonctions sont OK.

Avec l'activex, que j'utilisais avant, j'utilisais la fonction TwainPDFStart mais je ne retrouve pas cette méthode en .NET
Je suppose qu'il faut passer par GDPicturePDF pour enregistrer en PDF mes scans?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Mon Feb 06, 2012 10:40 pm

Salut,

En Anglais c'est toujours mieux pour partager l'info. Aussi les membres de mon équipe ne parlent pas Anglais.

Toutes les fontionnalités de manipulation du format PDF ont été migrées dans GdPicturePDF.

A bientôt,

Loïc

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Tue Feb 07, 2012 5:11 pm

Hi Loic,

Here is the code that works with windev :

Code: Select all

gdAD est un objet Automation dynamique 
gdAD = allouer un objet Automation "GdPicture.GdPictureImaging"
gdAD>>SetLicenseNumber("XXX")
i est un entier sur 4 octets = Handle(Fenêtre1)
iImage est un entier
iHandleFile est un entier
sNom, sNomPDF sont des chaînes

gdAD>>TwainCloseSource()
gdAD>>TwainSelectSource_2(i)
SI PAS gdAD>>TwainOpenSource_2(i,"Canon DR-2580C TWAIN") ALORS
	Erreur(gdAD>>TwainGetLastResultCode(),gdAD>>TwainGetLastConditionCode())
	RepriseSaisie(Btn_Param)
FIN
gdAD>>TwainSetAutoFeed(False)
gdAD>>TwainSetAutoScan(False)
gdAD>>TwainSetPixelType(0)
gdAD>>TwainSetResolution(150)
gdAD>>TwainSetPaperSize(6)
gdAD>>TwainSetImageFileFormat(6)
gdAD>>TwainSetHideUI(True)
SI Int_RV ALORS 
	gdAD>>TwainEnableDuplex(True)
SINON
	gdAD>>TwainEnableDuplex(False)
FIN
Info(gdAD>>TwainGetState())

sNom = fRepEnCours() + "\Test-" + DateDuJour() + HeureSys() + ".tiff"	
POUR i = 1 A sai_nbpage
	iImage = gdAD>>TwainAcquireToGDPictureImage_2(i)
         	SI iImage <> 0 ALORS
		SI i = 1 ALORS
			iHandleFile = iImage
			gdAD>>TiffSaveAsMultiPageFile(iHandleFile,sNom,65536)
		SINON
			gdAD>>TiffAddToMultipageFile(iHandleFile,iImage)
		FIN
		gdAD>>ReleaseGDPictureImage(iImage)
	FIN
FIN
gdAD>>TiffCloseMultiPageFile(iHandleFile)
gdAD>>ReleaseGDPictureImage(iHandleFile)

sNomPDF = fRepEnCours() + "\Test-" + DateDuJour() + HeureSys() + ".pdf"	
iHandleFile = gdAD>>CreateGdPictureImageFromFile(sNom)
gdAD>>PdfCreateFromMultipageTIFF(iHandleFile,sNomPDF,True,"Title","Author","Subject","Keywords","Creator")
gdAD>>TwainCloseSource()
gdAD>>ReleaseGDPictureImage(iHandleFile)
Thanks for you help.

I'll continue testing over TSE Environment.

According to the function i use, can you tell me what kind of version of GDPicture.NET i should buy?
Note : in the future, i'll also use GDPicturePDF Objects too.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Tue Feb 07, 2012 5:28 pm

Hello,

According the the comparison matrix located here: https://www.gdpicture.com/comparison/dot ... matrix.php

The Twain Pro edition should be enough, you don't need to acquire the GdPicturePDF Plugin since you don't use any part of the GdPicturePDF class.

Kind regards,

Loïc

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Tue Feb 07, 2012 5:40 pm

Hi,

And if i plan to use GDPicturePDF to print some PDF File directly, i would have to take Image Edition?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Tue Feb 07, 2012 5:52 pm

For such purpose this is required.
In other cases, it will be still possible to update your version to a higher edition by contacting our sales department.

Kind regards,

Loïc

giam153
Posts: 7
Joined: Wed Feb 01, 2012 11:53 am

Re: GDPicture.NET 8 et Windev

Post by giam153 » Tue Feb 07, 2012 5:55 pm

Thanks a lot for your help !!

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: GDPicture.NET 8 et Windev

Post by Loïc » Tue Feb 07, 2012 5:55 pm

Welcome :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest