We are using version 220.127.116.11 of GDPicture.NET.dll.
I have to do the following in a .NET application Iam developing:
* Load a document stored on the file system. (without showing it)
* Print its content. Printing should not be blocking the application, so it has to run in background.
* Delete de document from the file system.
This is the way I am trying to perform this printing (pseudo code):
Code: Select all
Public Sub PrintDoc() Dim pathOfDoc = ... 'here I set the path to the document 'I create a new viewer in order to load the document 'NOTE: I don't show the viewer itself on the GUI Dim mygdviewer as New GDviewer mygdviewer.DisplayFilefromByteArray (IO.File.ReadAllBytes(pathOfDoc)) 'I set the pages to print mygdviewer.PrintSetFromToPAge(1, mygdviewer.PageCount) 'I tell the viewer to pring mygdviewer.PrintFit() 'I delete the file IO.File.Delete(pathOfDoc)
In order to perform background printing I call PrintDoc() from a separate thread (is that a good idea?)
So, now I get following problems/questions:
* Printing is slow
* I don't know how to avoid the prinitng dialog
* Is there another class for printing than GDViewer?
* What is the best way to print the pdf file when no displaying of the file is required?
* The GDViewer in my separate thread seems to interfere with other GDViewers displayed in my GUI. Once I have printed, I get error messages when I continue using other GDViewers instantiated before printing. NOTE: My aplication contains a tab control that displays one GDViewer per tab page. So, several GDViewer can be displayed at the same time.
Can you answer my questions?