donwload pdf file after contactform 7 submisson

Try the following and replace [DOMAIN] by your own domain.

//contact form 7 Download white paper//
add_action( 'wp_footer', 'redirect_cf7' );

function redirect_cf7() {
    ?>
    <script type="text/javascript">
        document.addEventListener( 'wpcf7mailsent', function( event ) {
            if ( '4265' == event.detail.contactFormId ) { // Sends sumissions on form 4265 to the first thank you page
                var pdfLink = '[DOMAIN]/wp/wp-content/uploads/2018/06/file.pdf';
            } else if ( '4266' == event.detail.contactFormId ) { // Sends submissions on form 1070 to the second thank you page
                var pdfLink = '[DOMAIN]/wp/wp-content/uploads/2018/06/file2.pdf';
            }
            else {
                //do nothing
            }
            jQuery.get(pdfLink, (data) ->
              window.location.href = jQuery(this).attr('href');
            )
        }, false );
    </script>
    <?php
}