[repo] Format
This commit is contained in:
@@ -40,7 +40,10 @@ fn heavy_pdf(pages: usize, px: u32, jpeg: bool) -> Vec<u8> {
|
||||
s
|
||||
};
|
||||
let im = doc.add_object(stream);
|
||||
let content = format!("BT /F1 18 Tf 72 780 Td (Invoice page {} of the compress test) Tj ET q 450 0 0 450 72 250 cm /Im0 Do Q", p + 1);
|
||||
let content = format!(
|
||||
"BT /F1 18 Tf 72 780 Td (Invoice page {} of the compress test) Tj ET q 450 0 0 450 72 250 cm /Im0 Do Q",
|
||||
p + 1
|
||||
);
|
||||
let c = doc.add_object(Stream::new(dictionary! {}, content.into_bytes()));
|
||||
let page = doc.add_object(dictionary! {
|
||||
"Type" => "Page", "Parent" => pages_id, "Contents" => c,
|
||||
@@ -51,7 +54,7 @@ fn heavy_pdf(pages: usize, px: u32, jpeg: bool) -> Vec<u8> {
|
||||
doc.objects.insert(
|
||||
pages_id,
|
||||
Object::Dictionary(dictionary! {"Type" => "Pages", "Kids" => kids, "Count" => pages as i64,
|
||||
"MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()]}),
|
||||
"MediaBox" => vec![0.into(), 0.into(), 595.into(), 842.into()]}),
|
||||
);
|
||||
let cat = doc.add_object(dictionary! {"Type" => "Catalog", "Pages" => pages_id});
|
||||
doc.trailer.set("Root", cat);
|
||||
|
||||
Reference in New Issue
Block a user