gotenberg_pdf

Struct DocumentOptions

Source
pub struct DocumentOptions {
Show 25 fields pub trace_id: Option<String>, pub password: Option<String>, pub landscape: Option<bool>, pub native_page_ranges: Option<PageRange>, pub export_form_fields: Option<bool>, pub allow_duplicate_field_names: Option<bool>, pub export_bookmarks: Option<bool>, pub export_bookmarks_to_pdf_destination: Option<bool>, pub export_placeholders: Option<bool>, pub export_notes: Option<bool>, pub export_notes_pages: Option<bool>, pub export_only_notes_pages: Option<bool>, pub export_notes_in_margin: Option<bool>, pub convert_ooo_target_to_pdf_target: Option<bool>, pub export_links_relative_fsys: Option<bool>, pub export_hidden_slides: Option<bool>, pub skip_empty_pages: Option<bool>, pub add_original_document_as_stream: Option<bool>, pub single_page_sheets: Option<bool>, pub lossless_image_compression: Option<bool>, pub quality: Option<u8>, pub reduce_image_resolution: Option<bool>, pub max_image_resolution: Option<u32>, pub pdfa: Option<PDFFormat>, pub pdfua: Option<bool>,
}
Expand description

Options for converting a document to a PDF using the LibreOffice engine.

Fields§

§trace_id: Option<String>

By default, the API assigns a unique UUID trace to every request. However, you also have the option to specify the trace for each request. This trace will show up on the end server as a Gotenberg-Trace header.

§password: Option<String>

Set the password for opening the source file.

§landscape: Option<bool>

Set the paper orientation to landscape. default: false

§native_page_ranges: Option<PageRange>

Page ranges to print, e.g., ‘1-4’ - empty means all pages. default: All pages

§export_form_fields: Option<bool>

Specify whether form fields are exported as widgets or only their fixed print representation is exported. default: true

§allow_duplicate_field_names: Option<bool>

Specify whether multiple form fields exported are allowed to have the same field name. default: false

§export_bookmarks: Option<bool>

Specify if bookmarks are exported to PDF. default: true

§export_bookmarks_to_pdf_destination: Option<bool>

Specify that the bookmarks contained in the source LibreOffice file should be exported to the PDF file as Named Destination. default: false

§export_placeholders: Option<bool>

Export the placeholders fields visual markings only. The exported placeholder is ineffective. default: false

§export_notes: Option<bool>

Specify if notes are exported to PDF. default: false

§export_notes_pages: Option<bool>

Specify if notes pages are exported to PDF. Notes pages are available in Impress documents only. default: false

§export_only_notes_pages: Option<bool>

Specify, if the form field exportNotesPages is set to true, if only notes pages are exported to PDF. default: false

§export_notes_in_margin: Option<bool>

Specify if notes in margin are exported to PDF. default: false

§convert_ooo_target_to_pdf_target: Option<bool>

Specify that the target documents with .od[tpgs] extension, will have that extension changed to .pdf when the link is exported to PDF. The source document remains untouched. default: false

§export_links_relative_fsys: Option<bool>

Specify that the file system related hyperlinks (file:// protocol) present in the document will be exported as relative to the source document location. default: false

§export_hidden_slides: Option<bool>

Export, for LibreOffice Impress, slides that are not included in slide shows. default: false

§skip_empty_pages: Option<bool>

Specify that automatically inserted empty pages are suppressed. This option is active only if storing Writer documents. default: false

§add_original_document_as_stream: Option<bool>

Specify that a stream is inserted to the PDF file which contains the original document for archiving purposes. default: false

§single_page_sheets: Option<bool>

Ignore each sheet’s paper size, print ranges and shown/hidden status and puts every sheet (even hidden sheets) on exactly one page. default: false

§lossless_image_compression: Option<bool>

Specify if images are exported to PDF using a lossless compression format like PNG or compressed using the JPEG format. default: false

§quality: Option<u8>

Specify the quality of the JPG export. A higher value produces a higher-quality image and a larger file. Between 1 and 100. default: 90

§reduce_image_resolution: Option<bool>

Specify if the resolution of each image is reduced to the resolution specified by the form field maxImageResolution. default: false

§max_image_resolution: Option<u32>

If the form field reduceImageResolution is set to true, tell if all images will be reduced to the given value in DPI. Possible values are: 75, 150, 300, 600 and 1200. default: 300

§pdfa: Option<PDFFormat>

Convert the resulting PDF into the given PDF/A format

§pdfua: Option<bool>

Enable PDF for Universal Access for optimal accessibility.

Trait Implementations§

Source§

impl Clone for DocumentOptions

Source§

fn clone(&self) -> DocumentOptions

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for DocumentOptions

Source§

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

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

impl Default for DocumentOptions

Source§

fn default() -> DocumentOptions

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

impl<'de> Deserialize<'de> for DocumentOptions

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 Serialize for DocumentOptions

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

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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
Source§

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

Source§

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

Source§

impl<T> MaybeSendSync for T