Hello i just wrote my script to export PDF to PNG it works fine, but only if i have a TForm, - i would like to export it in a Service Application

My probem is that if i exprt it with

View    : TWPViewPDF;    p       : integer;begin    View    := TWPViewPDF.Create(self);    View.Parent  := self;    View.LoadFromFile('c:\test.pdf');    for p:=1 to View.PageCount do begin        View.WritePNG('c:\test'+IntToStr(p)+'.png', p, 72, wp256Color);    end;    View.Free;
  • i have to set the parent that it works.

If i export it with

wpview_pdfMakeJPEG('c:\test.pdf'
        , nil
        , '----'
        , '----'
        , 0
        , 'c:t\test_%d.png'
        , 1
        , 99
        , 72);

i get an access violation

What i do wrong?