Private Function OpenDocumentFromFile(sFilePath As String, pInst As LIBNAME.IPXC_Inst) As LIBNAME.IPXC_Document
Dim pDoc As LIBNAME.IPXC_Document = Nothing
pDoc = pInst.OpenDocumentFromFile(sFilePath, Nothing, Nothing, 0, 0)
Catch ex As Exception
Dim hr As Integer = Marshal.GetHRForException(ex)
Before I present an example available, I will describe the program sequence. A console application is started. The console application is waiting to process a PDF. With the launch IPXC_Inst::Init() is called, before exiting the console application IPXC_Inst::Finalize() runs.
The console application receives a message, processes the PDF and waits for the next request to process a PDF.
The PDF processing is implemented as a class from which an object is created. With this object, the PDF is processed.
Can I do it that way or do I need to outsource the processing of PDF in seperate program?
It's not a service, but it runs all time. Sample is difficult because console application works with iSeries data queues.
Meantime i have outsource PDF processing in a separate program and there are no problems.
Just spoke with Lzcat and he suspect that the problem could be several things - e.g. you are not waiting for the drivers API to finish it's work, but without seeing an actual example we can only guess.
In any case - we would not recommend you to do this - as even if the driver creates a PDF/A file - most Core API operations after that will break the compliance with the PDF/A format, and you will need to resave the file after modifying it with the Core API in the needed PDF sub-specification.