Skip to content

Commit

Permalink
fix: Exclude header controls from dashboard PDF export (#27068)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and pull[bot] committed Mar 14, 2024
1 parent 700afdb commit 4f96452
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 4f96452

Please sign in to comment.