Skip to main content

AddPageNumbersParams

Struct AddPageNumbersParams 

Source
pub struct AddPageNumbersParams {
Show 23 fields pub position: Option<AddPageNumbersPosition>, pub position_mode: Option<AddPageNumbersPositionMode>, pub x_percent: Option<f64>, pub y_percent: Option<f64>, pub scale: Option<f64>, pub format: Option<AddPageNumbersFormat>, pub template: Option<String>, pub prefix: Option<String>, pub suffix: Option<String>, pub page_mode: Option<AddPageNumbersPageMode>, pub facing_placement: Option<AddPageNumbersFacingPlacement>, pub start_number: Option<f64>, pub font_size: Option<f64>, pub font_family: Option<String>, pub font_style: Option<AddPageNumbersFontStyle>, pub x_offset: Option<f64>, pub y_offset: Option<f64>, pub margin: Option<f64>, pub rotation: Option<f64>, pub color: Option<String>, pub pages: Option<String>, pub output_name: Option<String>, pub extra: Object,
}
Expand description

Parameters of Add Page Numbers (add-page-numbers).

Fields§

§position: Option<AddPageNumbersPosition>

Number placement. Default: "middle-center".

§position_mode: Option<AddPageNumbersPositionMode>

Use a placement preset or percentage coordinates. Default: "preset".

§x_percent: Option<f64>

Horizontal center for custom placement. Default: 50. Range: 0 to 100. Used when position_mode is custom.

§y_percent: Option<f64>

Vertical center for custom placement. Default: 50. Range: 0 to 100. Used when position_mode is custom.

§scale: Option<f64>

Size multiplier applied to fontSize. Default: 1. Range: 0.1 to 4.

§format: Option<AddPageNumbersFormat>

Page-number text format. Default: "number".

§template: Option<String>

Custom template using {n} and {total}. Required in custom format. Used when format is custom.

§prefix: Option<String>

Text before the generated page number, up to 40 characters.

§suffix: Option<String>

Text after the generated page number, up to 40 characters.

§page_mode: Option<AddPageNumbersPageMode>

Single placement or mirrored facing-page placement. Default: "single".

§facing_placement: Option<AddPageNumbersFacingPlacement>

Place facing-page numbers inside or outside. Default: "outside". Used when page_mode is facing.

§start_number: Option<f64>

Number assigned to the first selected PDF page. Default: 1. Range: 1 to 1000000.

§font_size: Option<f64>

Number font size in points, before scale is applied. Default: 60. Range: 8 to 180.

§font_family: Option<String>

Number font: helvetica, times or courier (standard PDF fonts); gf:<id> embeds a family of the font catalog (/docs/fonts: every Google Fonts family, all scripts, shaped for Devanagari, Bengali, Tamil, Telugu and Arabic); u:<id> one of your uploaded fonts (the id from your fonts in the PDF editor; another person’s or a deleted font is refused). Default: "helvetica".

§font_style: Option<AddPageNumbersFontStyle>

Font style. Default: "regular".

§x_offset: Option<f64>

Fine horizontal offset in PDF points. Positive moves right. Default: 0.

§y_offset: Option<f64>

Fine vertical offset in PDF points. Positive moves down. Default: 0.

§margin: Option<f64>

Page-edge margin in PDF points for preset placement. Default: 36. Range: 0 to 240.

§rotation: Option<f64>

Turn of the number in degrees, counter-clockwise, from -360 to 360 (decimals allowed; 0 and 360 are upright). The number sits at its spot, and stays whole on the page, by the box it covers once turned. When omitted it is 45 for the diagonal position, otherwise 0. Range: -360 to 360 degrees.

§color: Option<String>

Number color as a six-digit hex value. Default: "#2e2e2e".

§pages: Option<String>

Pages to number; blank numbers every page. Page numbers and ranges separated by commas, plus odd, even, last and last-N (the Nth page before the last), e.g. 1-3,5, odd or 5-last.

§output_name: Option<String>

Output file name without a path; the extension is added for you.

§extra: Object

Further parameters this SDK version does not model.

Trait Implementations§

Source§

impl Clone for AddPageNumbersParams

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AddPageNumbersParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AddPageNumbersParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AddPageNumbersParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<AddPageNumbersParams> for ToolParameters

Source§

fn from(params: AddPageNumbersParams) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for AddPageNumbersParams

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AddPageNumbersParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AddPageNumbersParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more