Bump pdf-writer and svg2pdf

This commit is contained in:
Laurenz 2023-10-04 14:38:48 +02:00
parent 333e4037fc
commit 7dc74b7281
10 changed files with 18 additions and 18 deletions

9
Cargo.lock generated
View File

@ -1670,12 +1670,13 @@ dependencies = [
[[package]]
name = "pdf-writer"
version = "0.8.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d77bc47c8968aa63f86a7e6693e270a6cbd1e3b784c364f1711a0ddecc71447"
checksum = "4b651409cd03bf702052d7491f08d27fbd6b25f96dc8b9b873ada7d0b3342b8d"
dependencies = [
"bitflags 1.3.2",
"itoa",
"memchr",
"ryu",
]
@ -2367,9 +2368,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc"
[[package]]
name = "svg2pdf"
version = "0.7.1"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2adc7de163bd53f323850e65269280b2a66ffceee291cb8eca34f2eabc3acad"
checksum = "a4283ae77d25dbee75aa1bce6b5bc8e7d802960135d6de306eaec0a5241d80c8"
dependencies = [
"image",
"miniz_oxide",

View File

@ -31,7 +31,7 @@ kurbo = "0.9"
log = "0.4"
miniz_oxide = "0.7"
once_cell = "1"
pdf-writer = "0.8.1"
pdf-writer = "0.9"
pixglyph = "0.2"
palette = { version = "0.7.3", default-features = false, features = ["approx", "libm"] }
regex = "1"
@ -41,7 +41,7 @@ rustybuzz = "0.7"
serde = { version = "1.0.184", features = ["derive"] }
siphasher = "0.3"
subsetter = "0.1.1"
svg2pdf = "0.7.1"
svg2pdf = "0.8"
tiny-skia = "0.10.0"
toml = { version = "0.8", default-features = false, features = ["parse"] }
tracing = "0.1.37"

View File

@ -1,10 +1,9 @@
use std::sync::Arc;
use pdf_writer::types::DeviceNSubtype;
use pdf_writer::{writers, Dict, Filter, Name, PdfWriter, Ref};
use pdf_writer::{writers, Chunk, Dict, Filter, Name, Ref};
use super::page::{PageContext, Transforms};
use super::RefExt;
use crate::export::pdf::deflate;
use crate::geom::{Color, ColorSpace, Paint};
@ -162,7 +161,7 @@ impl ColorSpaces {
/// Write the necessary color spaces functions and ICC profiles to the
/// PDF file.
pub fn write_functions(&self, writer: &mut PdfWriter) {
pub fn write_functions(&self, writer: &mut Chunk) {
// Write the Oklab function & color space
if let Some(oklab) = self.oklab {
let code = oklab_function();

View File

@ -1,6 +1,6 @@
use pdf_writer::Finish;
use crate::export::pdf::{PdfContext, RefExt};
use crate::export::pdf::PdfContext;
/// A PDF external graphics state.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]

View File

@ -6,7 +6,7 @@ use pdf_writer::{Filter, Finish, Name, Rect, Str};
use ttf_parser::{name_id, GlyphId, Tag};
use unicode_properties::{GeneralCategory, UnicodeGeneralCategory};
use super::{deflate, EmExt, PdfContext, RefExt};
use super::{deflate, EmExt, PdfContext};
use crate::eval::Bytes;
use crate::font::Font;
use crate::util::SliceExt;

View File

@ -5,7 +5,7 @@ use pdf_writer::{Finish, Ref};
use super::color::{ColorSpaceExt, PaintEncode};
use super::page::{PageContext, Transforms};
use super::{AbsExt, PdfContext, RefExt};
use super::{AbsExt, PdfContext};
use crate::geom::{
Abs, Color, ColorSpace, Gradient, Numeric, Quadrant, Ratio, Relative, Transform,
};

View File

@ -4,7 +4,7 @@ use std::sync::Arc;
use image::{DynamicImage, GenericImageView, Rgba};
use pdf_writer::{Filter, Finish};
use super::{deflate, PdfContext, RefExt};
use super::{deflate, PdfContext};
use crate::{
geom::ColorSpace,
image::{ImageKind, RasterFormat, RasterImage},

View File

@ -19,7 +19,7 @@ use std::num::NonZeroUsize;
use ecow::{eco_format, EcoString};
use pdf_writer::types::Direction;
use pdf_writer::writers::PageLabel;
use pdf_writer::{Finish, Name, PdfWriter, Ref, TextStr};
use pdf_writer::{Finish, Name, Pdf, Ref, TextStr};
use xmp_writer::{LangId, RenditionClass, XmpWriter};
use self::gradient::PdfGradient;
@ -52,7 +52,7 @@ pub fn pdf(document: &Document) -> Vec<u8> {
pub struct PdfContext<'a> {
document: &'a Document,
introspector: Introspector,
writer: PdfWriter,
writer: Pdf,
colors: ColorSpaces,
pages: Vec<Page>,
page_heights: Vec<f32>,
@ -84,7 +84,7 @@ impl<'a> PdfContext<'a> {
Self {
document,
introspector: Introspector::new(&document.pages),
writer: PdfWriter::new(),
writer: Pdf::new(),
colors: ColorSpaces::default(),
pages: vec![],
page_heights: vec![],

View File

@ -2,7 +2,7 @@ use std::num::NonZeroUsize;
use pdf_writer::{Finish, Ref, TextStr};
use super::{AbsExt, PdfContext, RefExt};
use super::{AbsExt, PdfContext};
use crate::geom::{Abs, Smart};
use crate::model::Content;

View File

@ -9,7 +9,7 @@ use pdf_writer::{Content, Filter, Finish, Name, Rect, Ref, Str};
use super::color::PaintEncode;
use super::extg::ExternalGraphicsState;
use super::{deflate, AbsExt, EmExt, PdfContext, RefExt};
use super::{deflate, AbsExt, EmExt, PdfContext};
use crate::doc::{Destination, Frame, FrameItem, GroupItem, Meta, TextItem};
use crate::eval::Repr;
use crate::font::Font;