Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated items as part of release 0.9.0. #36

Open
ajrcarey opened this issue Jul 29, 2022 · 17 comments
Open

Remove deprecated items as part of release 0.9.0. #36

ajrcarey opened this issue Jul 29, 2022 · 17 comments
Assignees

Comments

@ajrcarey
Copy link
Owner

Tracking issue for deprecated items in the pdfium-render high-level interface.

@ajrcarey ajrcarey self-assigned this Jul 29, 2022
@ajrcarey
Copy link
Owner Author

ajrcarey commented Jul 29, 2022

The following items were deprecated as part of #35:

  • PdfBitmapConfig struct: replaced by equivalent renamed PdfRenderConfig
  • PdfPage::get_bitmap() function: replaced by equivalent renamed PdfPage::render()
  • PdfPage::get_bitmap_with_config() function: replaced by equivalent renamed PdfPage::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.

@ajrcarey
Copy link
Owner Author

ajrcarey commented Jul 30, 2022

The following additional item was deprecated as part of #35:

  • PdfRenderConfig::rotate_if_portait(): replaced by correctly-spelled equivalent PdfRenderConfig::rotate_if_portrait()

@ajrcarey
Copy link
Owner Author

ajrcarey commented Sep 17, 2022

The following additional items were deprecated as part of #44:

  • Pdfium::get_bindings(): renamed to Pdfium::bindings()

@ajrcarey
Copy link
Owner Author

The following additional items were deprecated as part of #63:

  • Pdfium::load_pdf_from_bytes(): renamed to Pdfium::load_pdf_from_byte_slice()

@ajrcarey
Copy link
Owner Author

ajrcarey commented Feb 4, 2023

The following additional items were deprecated as part of #67:

  • PdfPages::delete_page_at_index(): replaced by memory-safe PdfPage::delete()

@ajrcarey
Copy link
Owner Author

ajrcarey commented Feb 5, 2023

The following additional items were deprecated as part of #67:

  • PdfPages::delete_page_range(): replaced by memory-safe PdfPage::delete()

@ajrcarey
Copy link
Owner Author

ajrcarey commented Apr 10, 2023

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.

@ajrcarey
Copy link
Owner Author

ajrcarey commented Jun 18, 2023

The following additional items were deprecated as part of #90:

  • PdfBitmapRotation enum: renamed to PdfPageRenderRotation and moved from bitmap.rs into page.rs

@ajrcarey
Copy link
Owner Author

The following additional items were deprecated as part of #90:

  • PdfColor::SOLID_* consts: renamed to remove the superfluous SOLID_ prefix.

@ajrcarey
Copy link
Owner Author

The following additional items were deprecated as part of #96:

  • PdfBitmapFormat::BRGx variant: spelling corrected to PdfBitmap::BGRx

ajrcarey pushed a commit that referenced this issue Jul 30, 2023
@ajrcarey
Copy link
Owner Author

ajrcarey commented Jul 30, 2023

Updated examples/README.md to remove references to PdfFont functions deprecated during #79.

ajrcarey pushed a commit that referenced this issue Jul 30, 2023
@ajrcarey
Copy link
Owner Author

Updated examples/wasm.rs to remove references to PdfColor values deprecated during #90.

@ajrcarey
Copy link
Owner Author

ajrcarey commented Nov 3, 2023

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.

@ajrcarey
Copy link
Owner Author

ajrcarey commented Nov 3, 2023

The following additional items were deprecated as part of #117:

  • PdfPage::set_matrix_with_clip(): renamed to PdfPage::apply_matrix_with_clip().

@ajrcarey
Copy link
Owner Author

ajrcarey commented Nov 4, 2023

The following additional items were deprecated as part of #117:

  • set_matrix() in create_transform_setters!() macro: renamed to apply_matrix()

@ajrcarey
Copy link
Owner Author

ajrcarey commented Nov 25, 2023

The following additional items were deprecated as part of #119:

  • PdfBitmap::as_bytes(): renamed to PdfBitmap::as_raw_bytes().

@ajrcarey
Copy link
Owner Author

ajrcarey commented Aug 4, 2024

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant