We are trying to create a web service that will create a pdf using a third party tool. Only trouble is none of us have ever created a WCF and then consumed it on a Windows Form before.
I have added the reference successfully and can reference the class I created but I cannot figure out how to make it do it's job. I need to send a URL to the web service from a Web Browser Control. The web service will then create the PDF in byte code, then send it back to the client, the client will then show the PDF in a Web Browser Control. Can someone please tell me what I need to do? Any help will be appreciated. Thanks.
Public Interface ICreatePDF
Function CreatePDF(ByVal givenURL As String) As Byte
The Client Windows Form has the Service referenced. I just need to send the URL and then return the byte data the service renders.
Public Class CreatePDF
Public Function CreatePDF(ByVal givenURL As String) As Byte Implements ICreatePDF.CreatePDF
Dim theDoc As New Doc
Dim theID = theDoc.AddImageUrl(givenURL, True, 0, True)
Do While True
If Not theDoc.Chainable(theID) Then
theDoc.Page = theDoc.AddPage()
theID = theDoc.AddImageToChain(theID)
theDoc.SaveOptions.Linearize = True
Dim theData As Byte() = theDoc.GetData()