Remove deprecated items as part of release 0.9.0.
ajrcarey opened this issue · 17 comments
Tracking issue for deprecated items in the pdfium-render high-level interface.
The following items were deprecated as part of #35:
PdfBitmapConfig
struct: replaced by equivalent renamedPdfRenderConfig
PdfPage::get_bitmap()
function: replaced by equivalent renamedPdfPage::render()
PdfPage::get_bitmap_with_config()
function: replaced by equivalent renamedPdfPage::render_with_config()
PdfBitmap:render()
function: no longer necessary since page rendering operations are now processed eagerly rather than lazily. The function is now a no-op.
The following additional item was deprecated as part of #35:
PdfRenderConfig::rotate_if_portait()
: replaced by correctly-spelled equivalentPdfRenderConfig::rotate_if_portrait()
The following additional items were deprecated as part of #44:
Pdfium::get_bindings()
: renamed toPdfium::bindings()
The following additional items were deprecated as part of #63:
Pdfium::load_pdf_from_bytes()
: renamed toPdfium::load_pdf_from_byte_slice()
The following additional items were deprecated as part of #67:
PdfPages::delete_page_at_index()
: replaced by memory-safePdfPage::delete()
The following additional items were deprecated as part of #67:
PdfPages::delete_page_range()
: replaced by memory-safePdfPage::delete()
The following additional items were deprecated as part of #79:
PdfFont::new_built_in()
- All the
PdfFont
constructor functions for the 14 built-in PDF font types PdfFont::load_type1_from_file()
PdfFont::load_type1_from_reader()
PdfFont::load_type1_from_fetch()
PdfFont::load_type1_from_blob()
PdfFont::new_type1_from_bytes()
PdfFont::load_true_type_from_reader()
PdfFont::load_true_type_from_file()
PdfFont::load_true_type_from_reader()
PdfFont::load_true_type_from_fetch()
PdfFont::load_true_type_from_blob()
PdfFont::new_true_type_from_bytes()
All functions were moved into PdfFonts
. Additionally, PdfFont::new_type1_from_bytes()
and PdfFont::new_true_type_from_bytes()
were renamed to PdfFonts::load_type1_from_bytes()
and PdfFonts::load_true_type_from_bytes()
respectively.
The IntoPdfFontToken
trait can probably be removed once these deprecated items are removed, since it will no longer be possible to create a PdfFont
instance directly.
The following additional items were deprecated as part of #90:
PdfBitmapRotation
enum: renamed toPdfPageRenderRotation
and moved frombitmap.rs
intopage.rs
The following additional items were deprecated as part of #90:
PdfColor::SOLID_*
consts: renamed to remove the superfluousSOLID_
prefix.
The following additional items were deprecated as part of #96:
PdfBitmapFormat::BRGx
variant: spelling corrected toPdfBitmap::BGRx
Updated examples/README.md
to remove references to PdfFont
functions deprecated during #79.
Updated examples/wasm.rs
to remove references to PdfColor
values deprecated during #90.
Adjust function signature of PdfBitmap::as_image()
to return Result<DynamicImage, PdfiumError>
. This change cannot be easily deprecated; it will be a breaking change instead.
The following additional items were deprecated as part of #117:
PdfPage::set_matrix_with_clip()
: renamed toPdfPage::apply_matrix_with_clip()
.
The following additional items were deprecated as part of #117:
set_matrix()
increate_transform_setters!()
macro: renamed toapply_matrix()
The following additional items were deprecated as part of #119:
PdfBitmap::as_bytes()
: renamed toPdfBitmap::as_raw_bytes()
.
Should deprecate all non-idiomatically named get_*()
functions in create_transform_getters
macro for equivalently named non-get_
functions.
This also affects the get_*()
functions in PdfPageTextChar
, which follow the same naming as the transform getters but do not use the create_transform_getters
macro.
(It wasn't entirely clear to me at a glance why PdfPageTextChar
isn't using the create_transform_getters
macro, but presumably there's a reason. Could be worth checking to make sure this isn't just an oversight. If there is a reason, it would be good to document this.)