Thank you for the reply. But the post you provided only mention my secondary question. About the table of contents.
My PDF has a table of contents or links, but they weren't used during conversion
Calibre doesn't support the existing Table of Contents/links in a pdf, instead it uses a heuristical approach to guess where the appropriate chapter breaks are. This works well in some documents, but can produce poor results or false positives in other documents.
The article dosen`t mention anything about my main question that is how to convert bookmarks to chapters.