Sample code for 30+ languages & platforms
DataFlex

IntakeQ: Download Intake Form PDF

See more IntakeQ Examples

Use this method to download a client’s complete intake package as a PDF file.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoHttp
    String sTemp1

    Move False To iSuccess

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Send ComSetRequestHeader To hoHttp "X-Auth-Key" "xxxxxxxxxxxxxxxxxxxxxxxxx"

    Get ComDownload Of hoHttp "https://intakeq.com/api/v1/intakes/[intake-id]/pdf" "my_local_dir/intake_form_xxxx.pdf" To iSuccess
    If (iSuccess = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Showln "Success."


End_Procedure