mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Some TODOs
This commit is contained in:
parent
0cebe16938
commit
7b03c7567c
@ -206,6 +206,8 @@ def add_anchors_markup(root, uuid, anchors):
|
|||||||
|
|
||||||
|
|
||||||
def add_toc_links(container, toc, margin_groups):
|
def add_toc_links(container, toc, margin_groups):
|
||||||
|
# TODO: Change this to work for all anchors so it can be used to fix
|
||||||
|
# arbitrary links
|
||||||
uuid = uuid4()
|
uuid = uuid4()
|
||||||
name_anchor_map = {}
|
name_anchor_map = {}
|
||||||
for item in toc.iterdescendants():
|
for item in toc.iterdescendants():
|
||||||
@ -301,12 +303,18 @@ def convert(opf_path, opts, metadata=None, output_path=None, log=default_log, co
|
|||||||
else:
|
else:
|
||||||
pdf_doc.append(doc)
|
pdf_doc.append(doc)
|
||||||
|
|
||||||
|
# TODO: Fix links using anchor_locations
|
||||||
|
|
||||||
if cover_data:
|
if cover_data:
|
||||||
add_cover(pdf_doc, cover_data, page_layout, opts)
|
add_cover(pdf_doc, cover_data, page_layout, opts)
|
||||||
|
|
||||||
if metadata is not None:
|
if metadata is not None:
|
||||||
update_metadata(pdf_doc, PDFMetadata(metadata))
|
update_metadata(pdf_doc, PDFMetadata(metadata))
|
||||||
|
|
||||||
|
# TODO: Remove unused fonts
|
||||||
|
# TODO: Remove duplicate fonts
|
||||||
|
# TODO: Subset and embed fonts before rendering PDF
|
||||||
|
|
||||||
pdf_data = pdf_doc.write()
|
pdf_data = pdf_doc.write()
|
||||||
if output_path is None:
|
if output_path is None:
|
||||||
return pdf_data
|
return pdf_data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user