View Single Post
Old 05-10-2011, 07:32 AM   #1
Jonnster
Member
Jonnster began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2011
Device: Kindle 3
Structure Detection Problems

Before I bought my Kindle 3, I bought a very large programming book on C# and .NET. This also came with a PDF version of the book. I could sell the book and buy the Kindle specific version but I'd lose money and the Kindle version is not that much cheaper.

I would like to convert the PDF version to mobi and have been trying with Calibre (along with other options) unsuccessfully. I have just discovered the debug options in Calibre and have been looking through the debug output to try and see what is going on.

There are a couple of problem. Any tables or table based diagrams in the PDF are lost completely. I can live with this if I can solve the next problem.

The book contains a lot of short example code. Looking in the input directory, this is formatted correctly like this:

Code:
public class Garage 
{ 
  private Car[] carArray = new Car[4]; 
  ... 
  // Iterator method. 
  public IEnumerator GetEnumerator() 
  { 
    foreach (Car c in carArray) 
    { 
      yield return c; 
    } 
  } 
}
However, the parsed directory in the debug output has messed up this formatting and looks like this:

Code:
public class Garage

{

private Car[] carArray = new Car[4];

...

// Iterator method.

public IEnumerator GetEnumerator()

{

foreach (Car c in carArray)

{

yield return c;

}

}

}
From what I have read, this is caused by the Structure Detection settings in Calibre. However, this page is a foreign language to me and I wouldn't know where to start to solve this. Can anyone help?
Jonnster is offline   Reply With Quote