Skip to content

Commit

Permalink
export PDFDocumentType and PDFOptions types
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Feb 13, 2024
1 parent d05bfeb commit b28f6b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions playground/server/api/pdf/landscape.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { createPDF, streamReturnPDF } from '#pdf'
import { createPDF, streamReturnPDF, type PDFOptions } from '#pdf'

export default eventHandler(async (event) => {
const pdf = createPDF({
const options: PDFOptions = {
margins: {
top: 100,
bottom: 100,
left: 50,
right: 50,
},
layout: 'landscape'
})
}
const pdf = createPDF(options)
pdf.text('Welcome to NuxtPDF!')

pdf.end()
Expand Down
1 change: 1 addition & 0 deletions src/runtime/server/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { createPDF, streamReturnPDF } from './pdf'
export type { PDFDocumentType, PDFOptions } from '../types'

0 comments on commit b28f6b4

Please sign in to comment.