Skip to content

Commit

Permalink
Small bytes to vec optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
abdolence committed Aug 14, 2024
1 parent 5283208 commit 5f42a12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/file_converters/pdf_image_converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ impl PdfToImage for PdfImageConverter {
.set_target_width(2000)
.set_maximum_height(2000)
.rotate_if_landscape(PdfPageRenderRotation::Degrees90, true);
let document = self
.pdfium
.load_pdf_from_byte_vec(pdf_bytes.to_vec(), None)?;
let document = self.pdfium.load_pdf_from_byte_vec(pdf_bytes.into(), None)?;
let mut pdf_info = PdfInfo { pages: Vec::new() };
for page in document.pages().iter() {
let image = page.render_with_config(&render_config)?.as_image();
Expand Down

0 comments on commit 5f42a12

Please sign in to comment.