Creating GDViewer object in code
Creating GDViewer object in code
When I try and create the GDViewer object like below I get an error...
I get an error when I try...
Dim GDViewer as New GDViewer
But this works without issue for the imaging object...
Dim oImaging As New GdPictureImaging
In the demo, this worked... However, this is not the .NET version I am licensed for so I get a licensing error.
Dim oGdViewer As GdViewer = CType(CreateObject("GdViewer"), GdPicturePro5.GdViewer)
Can you tell me how to create the object so I can use the viewer and imaging object in code w/o having it on the form. I need to process image files and do cleanup, etc., to them. Thanks in advance.
MP
I get an error when I try...
Dim GDViewer as New GDViewer
But this works without issue for the imaging object...
Dim oImaging As New GdPictureImaging
In the demo, this worked... However, this is not the .NET version I am licensed for so I get a licensing error.
Dim oGdViewer As GdViewer = CType(CreateObject("GdViewer"), GdPicturePro5.GdViewer)
Can you tell me how to create the object so I can use the viewer and imaging object in code w/o having it on the form. I need to process image files and do cleanup, etc., to them. Thanks in advance.
MP
Re: Creating GDViewer object in code
Hi,
Code: Select all
Dim GdViewer1 As New GdPicture.GdViewer
Re: Creating GDViewer object in code
I tried...
Dim oGdViewer As New GdPicture.GdViewer
and I get the error "DragDrop registartion did not succeed."
Any ideas?
Dim oGdViewer As New GdPicture.GdViewer
and I get the error "DragDrop registartion did not succeed."
Any ideas?
Re: Creating GDViewer object in code
Still waiting for response,,,I need this ASAP to work. I'm going to loose this project!!
EDIT by Loïc Carrère -> it's normal, it's Sunday...
EDIT by Loïc Carrère -> it's normal, it's Sunday...
Re: Creating GDViewer object in code
Hi,
I can't reproduce your problem.
- I downloaded the lat GdPicture.NET package
- I opened a vb.net sample IE: C:\Program Files\GdPicture.NET\samples\vb.net\Image Processing\Image Processing.vbprog
- I added a button and the following code:
And all is working perfectly.
If you are able to give me a way to reproduce your error I will be able to help you more.
Kind regards,
Loïc
I can't reproduce your problem.
- I downloaded the lat GdPicture.NET package
- I opened a vb.net sample IE: C:\Program Files\GdPicture.NET\samples\vb.net\Image Processing\Image Processing.vbprog
- I added a button and the following code:
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim ooGdViewer As New GdPicture.GdViewer
ooGdViewer.SetLicenseNumber("XXX")
ooGdViewer.DisplayFromFile("")
End Sub
If you are able to give me a way to reproduce your error I will be able to help you more.
Kind regards,
Loïc
Re: Creating GDViewer object in code
I found that this is caused by me running my code in a thread. If I run it withouth the thread then I don't get the error when I create the object. I'm using the thread because I was having issued with the interface refreshing while processing files. V5 of this SDK (that's what I eval'ed) didn't have this issue and worked fine. Can you advise?
Re: Creating GDViewer object in code
Hi,
There is a lot of articles related to this issue which can be found with google. Maybe this can help you: http://www.google.com/#hl=en&safe=off&e ... XZkQW-twqo
Loïc
There is a lot of articles related to this issue which can be found with google. Maybe this can help you: http://www.google.com/#hl=en&safe=off&e ... XZkQW-twqo
Loïc
Re: Creating GDViewer object in code
Did you have any luck with a resolution? I am seeing the same D&D registration error. I am sure it has something to do with there being no form. I am trying to create the view object in memory without ever displaying it.
Re: Creating GDViewer object in code
Hi,
are you able to create a simple & standalone application which reproduce your problem ?
Kind regards,
Loïc
are you able to create a simple & standalone application which reproduce your problem ?
Kind regards,
Loïc
Re: Creating GDViewer object in code
We are encountering the same problem. It is giving us a "draganddropregistration" error. You can easly recreate the problem with a class library project. Let's assume you want to put up a server that has to work with both Imaging object and viewer object (at least to render pdf pages to imageviewer and then convert to something), you do this creating a class library (with or without a windows form containing the viewer) and as result you have:
1) Imaging object is always working;
2) viewer never works (you get an error at initialization time).
EG:
Any clue???????
RED_GROUP::Mau
1) Imaging object is always working;
2) viewer never works (you get an error at initialization time).
EG:
Code: Select all
GdPictureImaging imgMgr;
imgMgr = new GdPictureImaging(); //works fine
GdViewer doc;
doc = new GdViewer(); // crashes
doc.SilentMode = true;
RED_GROUP::Mau
Re: Creating GDViewer object in code
Hi,
Again we were unable to reproduce this problem. We need a sample application.
Kind regards,
Loïc
Again we were unable to reproduce this problem. We need a sample application.
Kind regards,
Loïc
Re: Creating GDViewer object in code
Sorry,
if you create a class library project, you will not have the drag&drop error message. Our scenario is much more complicated.
We have a class library that implements a remote server (using dot net remoting architecture). Then a client invokes a server method that uses GdViewer.
Then we encounter the error of the previous post.
I suppose the problem is in MTA or STA Thread. The error detail suggests us to use the [STAThread] tag, but we get the same error.
Any idea?
RED_GROUP::Mau
if you create a class library project, you will not have the drag&drop error message. Our scenario is much more complicated.
We have a class library that implements a remote server (using dot net remoting architecture). Then a client invokes a server method that uses GdViewer.
Then we encounter the error of the previous post.
I suppose the problem is in MTA or STA Thread. The error detail suggests us to use the [STAThread] tag, but we get the same error.
Any idea?
RED_GROUP::Mau
Re: Creating GDViewer object in code
We can bypass the problem using GdPictureImaging instead of GdViewer.
We have to extract a single page from a pdf file. This is the code we used for this purpose, can you tell us how to obtain the same thing (if it is possible) using GdPictureImaging?
Thanks in advance,
RED_GROUP::Mau
We have to extract a single page from a pdf file. This is the code we used for this purpose, can you tell us how to obtain the same thing (if it is possible) using GdPictureImaging?
Code: Select all
if (doc.DisplayFromFile(file) == GdPictureStatus.OK)
{
for (i = startIndexPage; i <= endIndexPage; i++)
{
pageID = doc.PdfRenderPageToGdPictureImage(Convert.ToInt32(doc.HorizontalResolution), i);
ret[j] = imgMgr.SaveAsString(pageID, DocumentFormat.DocumentFormatPDF, 0);
j += 1;
}
}
doc.Clear();
RED_GROUP::Mau
Re: Creating GDViewer object in code
Hi,
Unfortunately, handling existing PDF from the GdPictureImaging class is not yet available. This feature will be the major evolution of GdPicture.NET 6.5 editions.
With best regards,
Loïc
Unfortunately, handling existing PDF from the GdPictureImaging class is not yet available. This feature will be the major evolution of GdPicture.NET 6.5 editions.
With best regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest