Table of Content
HAL Forum
procedure SetMedia (
integer MediaType)
Description:
Sets the output media for the document that will be generated (e.g mtPdf)
Parameters:
MediaType The type of output that will be used when generating the document.
updating procedure CreateAndAttachPdfIV(record IVVc IVr)
begin
  string 255 fname,docname;
  
  fname = "tmp/" & IVr.SerNr & ".pdf";
  SetDocumentFilename(fname);
  SetMedia(mtPdf);
  docname = "InvForm";
  if (IVr.InvType==2) then begin docname = "CashInvForm"; end;
  if (IVr.InvType==3) then begin docname = "CredInvForm"; end;
  if (IVr.InvType==4) then begin docname = "IIInvForm"; end;
  if ((nonblank(IVr.PRCode)) and (IVr.InvType==1)) then begin
    docname = "ProjInvForm";
  end;
  PrintDocument(IVr,docname,false);
  if (FileExists(fname)) then begin
    RecordLinkFile(fname,0,IVr,CurrentCompany);
  end;
  SetDocumentFilename("");
  Delete_File(fname);
  
  RETURN;
END;
Related topics:
««