Some TODOs

This commit is contained in:
Kovid Goyal 2019-07-11 11:26:04 +05:30
parent 0cebe16938
commit 7b03c7567c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -206,6 +206,8 @@ def add_anchors_markup(root, uuid, anchors):
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()
name_anchor_map = {}
for item in toc.iterdescendants():
@ -301,12 +303,18 @@ def convert(opf_path, opts, metadata=None, output_path=None, log=default_log, co
else:
pdf_doc.append(doc)
# TODO: Fix links using anchor_locations
if cover_data:
add_cover(pdf_doc, cover_data, page_layout, opts)
if metadata is not None:
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()
if output_path is None:
return pdf_data