Skip to content

Commit

Permalink
fix(membership-registration): 404 error at pdf generation on mobile d…
Browse files Browse the repository at this point in the history
…evices

Signed-off-by: Martin Dünkelmann <nc-duenkekl3@netcologne.de>
  • Loading branch information
MartinX3 committed May 13, 2024
1 parent 3c6e221 commit 3611527
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/assets/img/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.png' {
const value: never
export = value
}
5 changes: 3 additions & 2 deletions src/components/pages/membership-registration/CPdfForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
import { ref } from 'vue'
import { colors, date, openURL } from 'quasar'
import { AcroFormCheckBox, jsPDF } from 'jspdf'
import 'src/assets/fonts/Bahnschrift-Regular-normal.js'
import 'assets/fonts/Bahnschrift-Regular-normal.js'
import bannerVertikal from 'assets/img/banner_vertikal.png'
import MembershipRegistration from 'src/models/entities/MembershipRegistration'
const props = defineProps<{ modelValue: MembershipRegistration }>()
Expand Down Expand Up @@ -524,7 +525,7 @@ const addPageBanner = () => {
for (let i = 1; i < totalPages; i++) {
const pageSize = internal.pageSize
pdfGenerator.setPage(i).addImage('/src/assets/img/banner_vertikal.png', 'PNG', pageSize.getWidth() - 9, 0, 9, pageSize.getHeight())
pdfGenerator.setPage(i).addImage(bannerVertikal, 'PNG', pageSize.getWidth() - 9, 0, 9, pageSize.getHeight())
}
}
Expand Down

0 comments on commit 3611527

Please sign in to comment.