Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?

1.) First, when creating a shortcode, you must return data, not print.

2.) Yes, you must explicitly specify the post id, print the id in the button or form of your shortcode, you can also use the shortcode attributes to generate a button for a specific post (See example)

Your shortcode code should be like this:

function lsmg_pdf($args) {
    global $post;
    $attrs = shortcode_atts([
        'pid' => $post -> ID
    ], $args);

    return "<div class="wrap">
        <form method='post' data-pid='".$attrs['pid']."' id='as-fdpf-form'>
            <button class="custom-botton" type="submit" name="generate_posts_pdf" value="generate">Download PDF</button>
        </form>
    </div>";
}

Global use: (Current post)

[fpdf-doc]

With a specific post:

[fpdf-doc pid=1]

Also you need to change your ajax function and send a post id from data-pid tag to the server each time after pressing the button

$('.custom-botton').on('click', function(e) {
    e.preventDefault();
    let POST_ID = $(this).parents('[data-pid]').data('pid');

    $.post(ajax_url, {
        action: 'generate_posts_pdf',
        pid: POST_ID
    });
});

And use it in get_post function on the server

add_action('wp_ajax_generate_posts_pdf', 'output_pdf');
add_action('wp_ajax_nopriv_generate_posts_pdf','output_pdf');

function output_pdf() {
   $post = get_post($_POST['pid']);
...

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)