I want convert an electronic book for Kindle. I tried to convert large, two languages text-based PDF ebook with complex formatting styles and images into AZW3 book for Kindle using Calibre, and also tried amazon service, but conversion results poor quality with multiple errors. I can no convert PDF ebook into plain text which best suits for kindle, because ebook contains multiple formatting styles, programming code and images.
What is the best way automatically crop the white margins of text-based multi-page PDF document and convert it to image-based PDF document, resized to fit 600 x 800 pixels?