Skip to content

Commit

Permalink
fix: Exclude header controls from dashboard PDF export (apache#27068)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and sfirke committed Mar 22, 2024
1 parent a89d966 commit 4c1e5f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions superset-frontend/src/types/dom-to-pdf.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ declare module 'dom-to-pdf' {
filename: string;
image: Image;
html2canvas: object;
excludeClassNames?: string[];
}

const domToPdf = (
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/utils/downloadAsPdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default function downloadAsPdf(
filename: `${generateFileStem(description)}.pdf`,
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 2 },
excludeClassNames: ['header-controls'],
};
return domToPdf(elementToPrint, options)
.then(() => {
Expand Down

0 comments on commit 4c1e5f7

Please sign in to comment.