@mcp-z/mcp-pdf
Preparing search index...
mcp
toolFactories
pdfDocument
Function pdfDocument
pdfDocument
()
:
{
config
:
{
description
:
"Create a flowing PDF document with automatic pagination.\n\nBest for: Reports, articles, letters, contracts, and documents with sequential content.\n\nContent flows naturally from top to bottom. Pages break automatically when content exceeds page height. Use \"pageBreak\" to force page breaks, \"divider\" for horizontal rules, and \"spacer\" for vertical spacing.\n\nSupported content types:\n- text: Body text with optional formatting (bold, italic, color, alignment)\n- heading: Section headings (larger font, bold by default)\n- image: Inline images that flow with content\n- divider: Horizontal line separators\n- spacer: Vertical whitespace\n- pageBreak: Force new page\n\nDefault margins: Varies by page size (e.g., 72pt/1\" for Letter, ~56pt for A4)."
;
inputSchema
:
ZodObject
<
{
author
:
ZodOptional
<
ZodString
>
;
color
:
ZodOptional
<
ZodObject
<
{
background
:
ZodOptional
<
ZodString
>
;
hyperlink
:
ZodOptional
<
ZodString
>
;
}
,
$strip
,
>
,
>
;
content
:
ZodArray
<
ZodUnion
<
readonly
[
ZodObject
<
{
bold
:
ZodOptional
<
ZodBoolean
>
;
characterSpacing
:
ZodOptional
<
ZodNumber
>
;
color
:
ZodOptional
<
ZodString
>
;
continued
:
ZodOptional
<
ZodBoolean
>
;
fontSize
:
ZodOptional
<
ZodNumber
>
;
indent
:
ZodOptional
<
ZodNumber
>
;
lineBreak
:
ZodOptional
<
ZodBoolean
>
;
lineGap
:
ZodOptional
<
ZodNumber
>
;
link
:
ZodOptional
<
ZodString
>
;
moveDown
:
ZodOptional
<
ZodNumber
>
;
oblique
:
ZodOptional
<
ZodUnion
<
(...)
>
>
;
paragraphGap
:
ZodOptional
<
ZodNumber
>
;
strike
:
ZodOptional
<
ZodBoolean
>
;
text
:
ZodOptional
<
ZodString
>
;
textAlign
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
type
:
ZodLiteral
<
"text"
>
;
underline
:
ZodOptional
<
ZodBoolean
>
;
width
:
ZodOptional
<
ZodNumber
>
;
wordSpacing
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
bold
:
ZodOptional
<
ZodBoolean
>
;
characterSpacing
:
ZodOptional
<
ZodNumber
>
;
color
:
ZodOptional
<
ZodString
>
;
continued
:
ZodOptional
<
ZodBoolean
>
;
fontSize
:
ZodOptional
<
ZodNumber
>
;
indent
:
ZodOptional
<
ZodNumber
>
;
lineBreak
:
ZodOptional
<
ZodBoolean
>
;
lineGap
:
ZodOptional
<
ZodNumber
>
;
link
:
ZodOptional
<
ZodString
>
;
moveDown
:
ZodOptional
<
ZodNumber
>
;
oblique
:
ZodOptional
<
ZodUnion
<
(...)
>
>
;
paragraphGap
:
ZodOptional
<
ZodNumber
>
;
strike
:
ZodOptional
<
ZodBoolean
>
;
text
:
ZodOptional
<
ZodString
>
;
textAlign
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
type
:
ZodLiteral
<
"heading"
>
;
underline
:
ZodOptional
<
ZodBoolean
>
;
width
:
ZodOptional
<
ZodNumber
>
;
wordSpacing
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
align
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
height
:
ZodOptional
<
ZodNumber
>
;
imagePath
:
ZodString
;
type
:
ZodLiteral
<
"image"
>
;
width
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
color
:
ZodOptional
<
ZodString
>
;
marginBottom
:
ZodOptional
<
ZodNumber
>
;
marginTop
:
ZodOptional
<
ZodNumber
>
;
thickness
:
ZodOptional
<
ZodNumber
>
;
type
:
ZodLiteral
<
"divider"
>
;
}
,
$strip
,
>
,
ZodObject
<
{
height
:
ZodNumber
;
type
:
ZodLiteral
<
"spacer"
>
}
,
$strip
>
,
ZodObject
<
{
type
:
ZodLiteral
<
"pageBreak"
>
}
,
$strip
>
,
]
,
>
,
>
;
filename
:
ZodOptional
<
ZodString
>
;
font
:
ZodOptional
<
ZodString
>
;
markdown
:
ZodOptional
<
ZodBoolean
>
;
pageSetup
:
ZodOptional
<
ZodObject
<
{
margins
:
ZodOptional
<
ZodObject
<
{
bottom
:
ZodNumber
;
left
:
ZodNumber
;
right
:
ZodNumber
;
top
:
ZodNumber
;
}
,
$strip
,
>
,
>
;
size
:
ZodOptional
<
ZodUnion
<
readonly
[
ZodEnum
<
(...)
>
,
ZodTuple
<
(...)
,
(...)
>
]
>
,
>
;
}
,
$strip
,
>
,
>
;
title
:
ZodOptional
<
ZodString
>
;
}
,
$strip
,
>
;
outputSchema
:
ZodObject
<
{
result
:
ZodObject
<
{
completedAt
:
ZodString
;
documentId
:
ZodString
;
filename
:
ZodString
;
itemsChanged
:
ZodNumber
;
itemsProcessed
:
ZodNumber
;
margins
:
ZodObject
<
{
bottom
:
ZodNumber
;
left
:
ZodNumber
;
right
:
ZodNumber
;
top
:
ZodNumber
;
}
,
$strip
,
>
;
operationSummary
:
ZodString
;
pageCount
:
ZodOptional
<
ZodNumber
>
;
sizeBytes
:
ZodNumber
;
uri
:
ZodString
;
warnings
:
ZodOptional
<
ZodArray
<
ZodString
>
>
;
}
,
$strip
,
>
;
}
,
$strip
,
>
;
title
:
"Create PDF Document"
;
}
;
handler
:
(
args
:
{
author
?:
string
;
color
?:
{
background
?:
string
;
hyperlink
?:
string
}
;
content
:
(
|
{
bold
?:
boolean
;
characterSpacing
?:
number
;
color
?:
string
;
continued
?:
boolean
;
fontSize
?:
number
;
indent
?:
number
;
lineBreak
?:
boolean
;
lineGap
?:
number
;
link
?:
string
;
moveDown
?:
number
;
oblique
?:
number
|
boolean
;
paragraphGap
?:
number
;
strike
?:
boolean
;
text
?:
string
;
textAlign
?:
"center"
|
"left"
|
"right"
|
"justify"
;
type
:
"text"
;
underline
?:
boolean
;
width
?:
number
;
wordSpacing
?:
number
;
}
|
{
bold
?:
boolean
;
characterSpacing
?:
number
;
color
?:
string
;
continued
?:
boolean
;
fontSize
?:
number
;
indent
?:
number
;
lineBreak
?:
boolean
;
lineGap
?:
number
;
link
?:
string
;
moveDown
?:
number
;
oblique
?:
number
|
boolean
;
paragraphGap
?:
number
;
strike
?:
boolean
;
text
?:
string
;
textAlign
?:
"center"
|
"left"
|
"right"
|
"justify"
;
type
:
"heading"
;
underline
?:
boolean
;
width
?:
number
;
wordSpacing
?:
number
;
}
|
{
align
?:
"center"
|
"left"
|
"right"
;
height
?:
number
;
imagePath
:
string
;
type
:
"image"
;
width
?:
number
;
}
|
{
color
?:
string
;
marginBottom
?:
number
;
marginTop
?:
number
;
thickness
?:
number
;
type
:
"divider"
;
}
|
{
height
:
number
;
type
:
"spacer"
}
|
{
type
:
"pageBreak"
}
)
[]
;
filename
?:
string
;
font
?:
string
;
markdown
?:
boolean
;
pageSetup
?:
{
margins
?:
{
bottom
:
number
;
left
:
number
;
right
:
number
;
top
:
number
;
}
;
size
?:
"LETTER"
|
"A4"
|
"LEGAL"
|
[
number
?
,
number
?
,
...
unknown
[]
]
;
}
;
title
?:
string
;
}
,
extra
:
StorageExtra
,
)
=>
Promise
<
{
[
key
:
string
]:
unknown
}
>
;
name
:
string
;
}
Returns
{
config
:
{
description
:
"Create a flowing PDF document with automatic pagination.\n\nBest for: Reports, articles, letters, contracts, and documents with sequential content.\n\nContent flows naturally from top to bottom. Pages break automatically when content exceeds page height. Use \"pageBreak\" to force page breaks, \"divider\" for horizontal rules, and \"spacer\" for vertical spacing.\n\nSupported content types:\n- text: Body text with optional formatting (bold, italic, color, alignment)\n- heading: Section headings (larger font, bold by default)\n- image: Inline images that flow with content\n- divider: Horizontal line separators\n- spacer: Vertical whitespace\n- pageBreak: Force new page\n\nDefault margins: Varies by page size (e.g., 72pt/1\" for Letter, ~56pt for A4)."
;
inputSchema
:
ZodObject
<
{
author
:
ZodOptional
<
ZodString
>
;
color
:
ZodOptional
<
ZodObject
<
{
background
:
ZodOptional
<
ZodString
>
;
hyperlink
:
ZodOptional
<
ZodString
>
;
}
,
$strip
,
>
,
>
;
content
:
ZodArray
<
ZodUnion
<
readonly
[
ZodObject
<
{
bold
:
ZodOptional
<
ZodBoolean
>
;
characterSpacing
:
ZodOptional
<
ZodNumber
>
;
color
:
ZodOptional
<
ZodString
>
;
continued
:
ZodOptional
<
ZodBoolean
>
;
fontSize
:
ZodOptional
<
ZodNumber
>
;
indent
:
ZodOptional
<
ZodNumber
>
;
lineBreak
:
ZodOptional
<
ZodBoolean
>
;
lineGap
:
ZodOptional
<
ZodNumber
>
;
link
:
ZodOptional
<
ZodString
>
;
moveDown
:
ZodOptional
<
ZodNumber
>
;
oblique
:
ZodOptional
<
ZodUnion
<
(...)
>
>
;
paragraphGap
:
ZodOptional
<
ZodNumber
>
;
strike
:
ZodOptional
<
ZodBoolean
>
;
text
:
ZodOptional
<
ZodString
>
;
textAlign
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
type
:
ZodLiteral
<
"text"
>
;
underline
:
ZodOptional
<
ZodBoolean
>
;
width
:
ZodOptional
<
ZodNumber
>
;
wordSpacing
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
bold
:
ZodOptional
<
ZodBoolean
>
;
characterSpacing
:
ZodOptional
<
ZodNumber
>
;
color
:
ZodOptional
<
ZodString
>
;
continued
:
ZodOptional
<
ZodBoolean
>
;
fontSize
:
ZodOptional
<
ZodNumber
>
;
indent
:
ZodOptional
<
ZodNumber
>
;
lineBreak
:
ZodOptional
<
ZodBoolean
>
;
lineGap
:
ZodOptional
<
ZodNumber
>
;
link
:
ZodOptional
<
ZodString
>
;
moveDown
:
ZodOptional
<
ZodNumber
>
;
oblique
:
ZodOptional
<
ZodUnion
<
(...)
>
>
;
paragraphGap
:
ZodOptional
<
ZodNumber
>
;
strike
:
ZodOptional
<
ZodBoolean
>
;
text
:
ZodOptional
<
ZodString
>
;
textAlign
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
type
:
ZodLiteral
<
"heading"
>
;
underline
:
ZodOptional
<
ZodBoolean
>
;
width
:
ZodOptional
<
ZodNumber
>
;
wordSpacing
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
align
:
ZodOptional
<
ZodEnum
<
(...)
>
>
;
height
:
ZodOptional
<
ZodNumber
>
;
imagePath
:
ZodString
;
type
:
ZodLiteral
<
"image"
>
;
width
:
ZodOptional
<
ZodNumber
>
;
}
,
$strip
,
>
,
ZodObject
<
{
color
:
ZodOptional
<
ZodString
>
;
marginBottom
:
ZodOptional
<
ZodNumber
>
;
marginTop
:
ZodOptional
<
ZodNumber
>
;
thickness
:
ZodOptional
<
ZodNumber
>
;
type
:
ZodLiteral
<
"divider"
>
;
}
,
$strip
,
>
,
ZodObject
<
{
height
:
ZodNumber
;
type
:
ZodLiteral
<
"spacer"
>
}
,
$strip
>
,
ZodObject
<
{
type
:
ZodLiteral
<
"pageBreak"
>
}
,
$strip
>
,
]
,
>
,
>
;
filename
:
ZodOptional
<
ZodString
>
;
font
:
ZodOptional
<
ZodString
>
;
markdown
:
ZodOptional
<
ZodBoolean
>
;
pageSetup
:
ZodOptional
<
ZodObject
<
{
margins
:
ZodOptional
<
ZodObject
<
{
bottom
:
ZodNumber
;
left
:
ZodNumber
;
right
:
ZodNumber
;
top
:
ZodNumber
;
}
,
$strip
,
>
,
>
;
size
:
ZodOptional
<
ZodUnion
<
readonly
[
ZodEnum
<
(...)
>
,
ZodTuple
<
(...)
,
(...)
>
]
>
,
>
;
}
,
$strip
,
>
,
>
;
title
:
ZodOptional
<
ZodString
>
;
}
,
$strip
,
>
;
outputSchema
:
ZodObject
<
{
result
:
ZodObject
<
{
completedAt
:
ZodString
;
documentId
:
ZodString
;
filename
:
ZodString
;
itemsChanged
:
ZodNumber
;
itemsProcessed
:
ZodNumber
;
margins
:
ZodObject
<
{
bottom
:
ZodNumber
;
left
:
ZodNumber
;
right
:
ZodNumber
;
top
:
ZodNumber
;
}
,
$strip
,
>
;
operationSummary
:
ZodString
;
pageCount
:
ZodOptional
<
ZodNumber
>
;
sizeBytes
:
ZodNumber
;
uri
:
ZodString
;
warnings
:
ZodOptional
<
ZodArray
<
ZodString
>
>
;
}
,
$strip
,
>
;
}
,
$strip
,
>
;
title
:
"Create PDF Document"
;
}
;
handler
:
(
args
:
{
author
?:
string
;
color
?:
{
background
?:
string
;
hyperlink
?:
string
}
;
content
:
(
|
{
bold
?:
boolean
;
characterSpacing
?:
number
;
color
?:
string
;
continued
?:
boolean
;
fontSize
?:
number
;
indent
?:
number
;
lineBreak
?:
boolean
;
lineGap
?:
number
;
link
?:
string
;
moveDown
?:
number
;
oblique
?:
number
|
boolean
;
paragraphGap
?:
number
;
strike
?:
boolean
;
text
?:
string
;
textAlign
?:
"center"
|
"left"
|
"right"
|
"justify"
;
type
:
"text"
;
underline
?:
boolean
;
width
?:
number
;
wordSpacing
?:
number
;
}
|
{
bold
?:
boolean
;
characterSpacing
?:
number
;
color
?:
string
;
continued
?:
boolean
;
fontSize
?:
number
;
indent
?:
number
;
lineBreak
?:
boolean
;
lineGap
?:
number
;
link
?:
string
;
moveDown
?:
number
;
oblique
?:
number
|
boolean
;
paragraphGap
?:
number
;
strike
?:
boolean
;
text
?:
string
;
textAlign
?:
"center"
|
"left"
|
"right"
|
"justify"
;
type
:
"heading"
;
underline
?:
boolean
;
width
?:
number
;
wordSpacing
?:
number
;
}
|
{
align
?:
"center"
|
"left"
|
"right"
;
height
?:
number
;
imagePath
:
string
;
type
:
"image"
;
width
?:
number
;
}
|
{
color
?:
string
;
marginBottom
?:
number
;
marginTop
?:
number
;
thickness
?:
number
;
type
:
"divider"
;
}
|
{
height
:
number
;
type
:
"spacer"
}
|
{
type
:
"pageBreak"
}
)
[]
;
filename
?:
string
;
font
?:
string
;
markdown
?:
boolean
;
pageSetup
?:
{
margins
?:
{
bottom
:
number
;
left
:
number
;
right
:
number
;
top
:
number
;
}
;
size
?:
"LETTER"
|
"A4"
|
"LEGAL"
|
[
number
?
,
number
?
,
...
unknown
[]
]
;
}
;
title
?:
string
;
}
,
extra
:
StorageExtra
,
)
=>
Promise
<
{
[
key
:
string
]:
unknown
}
>
;
name
:
string
;
}
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
@mcp-z/mcp-pdf
Loading...