Unfortunately PDF is just about the least satisfactory format there is as a source to convert. This
PDF sticky attempts to educate you on what you're up against.
The PDF's own TOC will not be used in the conversion, nevertheless, if your PDF chapters are marked in a 'standard' way (e.g. 'Chapter 1', 'Epilogue' plus other common variants) then the
Convert - Heuristic Processing page may help you. You will need to read the relevant part of the Calibre manual to decide which checkboxes to check/uncheck for any particular PDF. There's a link included on the Heuristic page.