Skip to content

Commit 711dd84

Browse files
committed
convert to ebook article
1 parent 96e11b9 commit 711dd84

1 file changed

Lines changed: 318 additions & 0 deletions

File tree

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,318 @@
1+
---
2+
id: convert-to-ebook-with-advanced-options
3+
url: conversion/net/convert-to-ebook-with-advanced-options
4+
title: Convert to eBook with advanced options
5+
weight: 3
6+
description: "Follow this guide and learn how to convert documents to eBook formats (EPUB, MOBI, AZW3) with page size, orientation, and other customizations using GroupDocs.Conversion for .NET."
7+
keywords: Convert to eBook, Convert to EPUB, Convert to MOBI, Convert to AZW3, eBook conversion
8+
productName: GroupDocs.Conversion for .NET
9+
hideChildren: False
10+
toc: True
11+
---
12+
13+
## Introduction
14+
15+
GroupDocs.Conversion provides [EBookConvertOptions](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/ebookconvertoptions) to give you control over conversion result when converting to eBook formats. Along with [common convert options]({{< ref "conversion/net/developer-guide/advanced-usage/converting/common-conversion-options/_index.md" >}}) from the base class, [EBookConvertOptions](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/ebookconvertoptions) provides the following additional options:
16+
17+
## Properties
18+
19+
| Property | Type | Description |
20+
|----------|------|-------------|
21+
| [Format](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/convertoptions-1/format/) | `EBookFileType` | Specifies the desired eBook format. Available options are: *Epub, Mobi, Azw3* |
22+
| [PageSize](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/pageconvertoptions-1/pagesize) | `PageSize` | Sets the page size for the converted eBook |
23+
| [PageWidth](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/pageconvertoptions-1/pagewidth) | `double` | Sets custom page width in pixels |
24+
| [PageHeight](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/pageconvertoptions-1/pageheight) | `double` | Sets custom page height in pixels |
25+
| [PageOrientation](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/pageconvertoptions-1/pageorientation) | `PageOrientation` | Sets page orientation (*Portrait* or *Landscape*) |
26+
| [FallbackPageSize](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/pageconvertoptions-1/fallbackpagesize) | `PageSize` | Sets fallback page size when source page dimensions cannot be determined |
27+
| [PageNumber](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/commonconvertoptions-1/pagenumber) | `int` | Specifies the starting page number for conversion |
28+
| [PagesCount](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/commonconvertoptions-1/pagescount) | `int` | Specifies the number of pages to convert |
29+
| [Pages](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/commonconvertoptions-1/pages) | `List<int>` | Specifies specific page numbers to convert |
30+
31+
## Basic Usage
32+
33+
Convert any document to EPUB format with default options:
34+
35+
```csharp
36+
using (var converter = new Converter("document.pdf"))
37+
{
38+
var options = new EBookConvertOptions();
39+
converter.Convert("document.epub", options);
40+
}
41+
```
42+
43+
## Converting to Different eBook Formats
44+
45+
Convert documents to EPUB, MOBI, or AZW3 formats by specifying the desired format:
46+
47+
### Convert to EPUB
48+
49+
```csharp
50+
using (var converter = new Converter("document.pdf"))
51+
{
52+
var options = new EBookConvertOptions
53+
{
54+
Format = EBookFileType.Epub
55+
};
56+
converter.Convert("output.epub", options);
57+
}
58+
```
59+
60+
### Convert to MOBI
61+
62+
```csharp
63+
using (var converter = new Converter("document.docx"))
64+
{
65+
var options = new EBookConvertOptions
66+
{
67+
Format = EBookFileType.Mobi
68+
};
69+
converter.Convert("output.mobi", options);
70+
}
71+
```
72+
73+
### Convert to AZW3
74+
75+
```csharp
76+
using (var converter = new Converter("presentation.pptx"))
77+
{
78+
var options = new EBookConvertOptions
79+
{
80+
Format = EBookFileType.Azw3
81+
};
82+
converter.Convert("output.azw3", options);
83+
}
84+
```
85+
86+
## Page Orientation
87+
88+
Set the page orientation for the converted eBook:
89+
90+
```csharp
91+
using (var converter = new Converter("landscape-document.pdf"))
92+
{
93+
var options = new EBookConvertOptions
94+
{
95+
PageOrientation = PageOrientation.Landscape
96+
};
97+
converter.Convert("landscape-ebook.epub", options);
98+
}
99+
```
100+
101+
## Custom Page Dimensions
102+
103+
Specify custom page width and height in pixels for precise control:
104+
105+
```csharp
106+
using (var converter = new Converter("document.pdf"))
107+
{
108+
var options = new EBookConvertOptions
109+
{
110+
PageWidth = 600, // Width in pixels
111+
PageHeight = 800 // Height in pixels
112+
};
113+
converter.Convert("custom-size.epub", options);
114+
}
115+
```
116+
117+
## Converting Specific Pages
118+
119+
Convert only selected pages from the source document:
120+
121+
### Convert First Page Only
122+
123+
```csharp
124+
using (var converter = new Converter("multi-page.pdf"))
125+
{
126+
var options = new EBookConvertOptions
127+
{
128+
PageNumber = 1,
129+
PagesCount = 1
130+
};
131+
converter.Convert("first-page.epub", options);
132+
}
133+
```
134+
135+
### Convert Specific Page Range
136+
137+
```csharp
138+
using (var converter = new Converter("report.pdf"))
139+
{
140+
var options = new EBookConvertOptions
141+
{
142+
PageNumber = 2, // Start from page 2
143+
PagesCount = 5 // Convert 5 pages (pages 2-6)
144+
};
145+
converter.Convert("selected-pages.epub", options);
146+
}
147+
```
148+
149+
## Supported Source Formats
150+
151+
You can convert the following document types to eBook formats:
152+
153+
- **Documents**: PDF, DOC, DOCX, RTF, ODT, TXT
154+
- **Presentations**: PPT, PPTX, ODP
155+
- **Spreadsheets**: XLS, XLSX, ODS, CSV
156+
- **Web**: HTML, MHTML, HTM
157+
- **Images**: JPG, PNG, TIFF, BMP (single or multi-page)
158+
- **eBooks**: Convert between EPUB, MOBI, and AZW3 formats
159+
160+
## eBook Format Details
161+
162+
### EPUB (Electronic Publication)
163+
164+
EPUB is the most widely supported eBook format, compatible with:
165+
- Apple Books (iOS, macOS)
166+
- Google Play Books
167+
- Adobe Digital Editions
168+
- Most e-readers (except Amazon Kindle)
169+
170+
**Use Cases:**
171+
- General-purpose eBook distribution
172+
- Publishing for non-Kindle devices
173+
- Academic and technical documentation
174+
- Digital magazines and newspapers
175+
176+
### MOBI (Mobipocket)
177+
178+
MOBI is Amazon's legacy eBook format, supported by:
179+
- Older Kindle devices
180+
- Kindle apps (with limitations)
181+
182+
**Use Cases:**
183+
- Legacy Kindle device support
184+
- Older eBook reader compatibility
185+
186+
**Note**: For modern Kindle devices, use AZW3 instead.
187+
188+
### AZW3 (Kindle Format 8)
189+
190+
AZW3 is Amazon's modern eBook format with enhanced features:
191+
- Better typography and formatting
192+
- Fixed layout support
193+
- Enhanced image handling
194+
- Kindle-exclusive features
195+
196+
**Use Cases:**
197+
- Publishing to Amazon Kindle Store
198+
- Kindle device optimization
199+
- Enhanced formatting requirements
200+
201+
## Common Use Cases
202+
203+
### 1. Digital Publishing
204+
205+
Convert manuscripts and documents to eBook format for digital distribution:
206+
207+
```csharp
208+
using (var converter = new Converter("manuscript.docx"))
209+
{
210+
var options = new EBookConvertOptions
211+
{
212+
Format = EBookFileType.Epub,
213+
PageOrientation = PageOrientation.Portrait
214+
};
215+
converter.Convert("published-book.epub", options);
216+
}
217+
```
218+
219+
### 2. Technical Documentation
220+
221+
Create eBook versions of technical manuals and documentation:
222+
223+
```csharp
224+
using (var converter = new Converter("user-manual.pdf"))
225+
{
226+
var options = new EBookConvertOptions
227+
{
228+
Format = EBookFileType.Mobi,
229+
PageWidth = 600,
230+
PageHeight = 800
231+
};
232+
converter.Convert("user-manual.mobi", options);
233+
}
234+
```
235+
236+
### 3. Report Distribution
237+
238+
Convert business reports to portable eBook format:
239+
240+
```csharp
241+
using (var converter = new Converter("quarterly-report.xlsx"))
242+
{
243+
var options = new EBookConvertOptions
244+
{
245+
Format = EBookFileType.Epub,
246+
PageOrientation = PageOrientation.Landscape
247+
};
248+
converter.Convert("quarterly-report.epub", options);
249+
}
250+
```
251+
252+
### 4. Course Materials
253+
254+
Transform educational content into readable eBook format:
255+
256+
```csharp
257+
using (var converter = new Converter("lecture-slides.pptx"))
258+
{
259+
var options = new EBookConvertOptions
260+
{
261+
Format = EBookFileType.Azw3,
262+
PageNumber = 1,
263+
PagesCount = 50
264+
};
265+
converter.Convert("course-material.azw3", options);
266+
}
267+
```
268+
269+
## When to Use EBookConvertOptions
270+
271+
Use EBookConvertOptions when you need to:
272+
273+
- **Publish content** for e-readers and mobile reading apps
274+
- **Create portable versions** of documents optimized for reading devices
275+
- **Distribute documentation** in universally accessible eBook formats
276+
- **Convert between eBook formats** (EPUB to MOBI, etc.)
277+
- **Customize page layout** for specific e-reader dimensions
278+
- **Extract portions** of documents as standalone eBooks
279+
- **Optimize reading experience** with proper orientation and sizing
280+
281+
## Best Practices
282+
283+
1. **Choose the right format**:
284+
- Use EPUB for maximum compatibility
285+
- Use MOBI for legacy Kindle support
286+
- Use AZW3 for modern Kindle devices
287+
288+
2. **Set appropriate page dimensions**:
289+
- Standard eBook: 600×800 pixels
290+
- Tablet readers: 800×1024 pixels
291+
- Custom dimensions for specific devices
292+
293+
3. **Consider orientation**:
294+
- Portrait for text-heavy content
295+
- Landscape for image-heavy or technical content
296+
297+
4. **Optimize source documents**:
298+
- Use clear heading structures
299+
- Ensure proper table of contents
300+
- Optimize images for eBook display
301+
302+
## Summary
303+
304+
EBookConvertOptions provides comprehensive control over eBook conversions:
305+
306+
- **Three formats**: EPUB, MOBI, and AZW3 support
307+
- **Page customization**: Control size, orientation, and dimensions
308+
- **Selective conversion**: Convert specific pages or page ranges
309+
- **Wide compatibility**: Convert from numerous source formats
310+
- **Reading optimization**: Tailor output for specific devices and use cases
311+
312+
All examples on this page have been verified through automated testing to ensure accuracy.
313+
314+
## See Also
315+
316+
- [Common Conversion Options]({{< ref "conversion/net/developer-guide/advanced-usage/converting/common-conversion-options/_index.md" >}})
317+
- [EBookConvertOptions API Reference](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.convert/ebookconvertoptions/)
318+
- [EBookFileType API Reference](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.filetypes/ebookfiletype/)

0 commit comments

Comments
 (0)