pdfextractor
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/EmmS21/daggerverse/pdfextractor@051c66e503309ab614fb64f5150d11389bc888f3
Entrypoint
Return Type
Pdfextractor !
Example
dagger -m github.com/EmmS21/daggerverse/pdfextractor@051c66e503309ab614fb64f5150d11389bc888f3 call \
func (m *myModule) example() *Pdfextractor {
return dag.
Pdfextractor()
}
@function
def example() -> dag.Pdfextractor:
return (
dag.pdfextractor()
)
@func()
example(): Pdfextractor {
return dag
.pdfextractor()
}
Types
Pdfextractor 🔗
extract() 🔗
Extracts a specific page from a PDF and returns it as a base64 encoded string Args: pdf_path: Path to the PDF file page_number: Page number to extract (1-based index) Returns: Base64 encoded string of the extracted page image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pdfPath | Directory ! | - | A directory. |
pageNumber | Integer ! | - | No description provided |
Example
dagger -m github.com/EmmS21/daggerverse/pdfextractor@051c66e503309ab614fb64f5150d11389bc888f3 call \
extract --pdf-path DIR_PATH --page-number integer
func (m *myModule) example(ctx context.Context, pdfPath *Directory, pageNumber int) string {
return dag.
Pdfextractor().
Extract(ctx, pdfPath, pageNumber)
}
@function
async def example(pdf_path: dagger.Directory, page_number: int) -> str:
return await (
dag.pdfextractor()
.extract(pdf_path, page_number)
)
@func()
async example(pdfPath: Directory, pageNumber: number): Promise<string> {
return dag
.pdfextractor()
.extract(pdfPath, pageNumber)
}