Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New basePdf type and Support adding new pages to template #394

Merged
merged 20 commits into from Jan 3, 2024
Merged

Conversation

hand-dot
Copy link
Collaborator

@hand-dot hand-dot commented Dec 27, 2023

ref:


TODO

  • padding (This is used for page breaks by dynamic tables and the draggable area in the designer.)
  • add / remove page from designer function
  • add/remove page button ui design
  • add ui to set padding
  • add demo to website and playground(because this feature is not available if basePdf doesn't have width and height this feature will not be shown existing site) -> Create a demo of a blank PDF and a dynamic table #401

preview

My.Movie.mp4

Copy link

vercel bot commented Dec 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
pdfme-playground ⬜️ Ignored (Inspect) Visit Preview Jan 3, 2024 7:46am

@hand-dot hand-dot changed the title New basePdf type and Support adding new pages to template [WIP] New basePdf type and Support adding new pages to template Dec 27, 2023
@hand-dot

This comment was marked as outdated.

@hand-dot

This comment was marked as outdated.

@hand-dot

This comment was marked as outdated.

@hand-dot hand-dot changed the title [WIP] New basePdf type and Support adding new pages to template New basePdf type and Support adding new pages to template Dec 31, 2023
Copy link
Collaborator Author

@hand-dot hand-dot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peteward
If you have time, could you check this PR?
Of course, I would prefer you to prioritize family time over the review.

@@ -404,7 +404,16 @@
}
}
],
"basePdf": "data:application/pdf;base64,JVBERi0xLjcKJYGBgYEKCjUgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCAzOAo+PgpzdHJlYW0KeJwr5DJQMFAwtTTVMzFRsDAx1LM0UihK5QrX4srjCuQCAF0PBgoKZW5kc3RyZWFtCmVuZG9iagoKNiAwIG9iago8PAovVHlwZSAvWE9iamVjdAovU3VidHlwZSAvRm9ybQovRm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NmT+566fxYugxed4u6VBP7RFVy+o3S0QXdnSQUF6n0BY+NsW0P7YUwDruOkr6hSYWo/xC/qsvt2+ZXUPjZ1eWOONf1+lFt8S8g5JUqGgg7/0l31oDII/07TECmMgGR0GeAypnT7S03Y1NUCITz2CNFoxYR73FzMBhK2k3V7gbL4kdvfTjuaLl0uP3sF/7EvKxQQvoazN+YNZ1nXuNtVDTtVvZ6nt2q3Yk8/8w7il4eGqpibh5tiz/Zy8bVBzgba7tGurp3tcbac/OsT3/uq9ntKtz6LnkL/8uZ+09kS7ovNEOCvEPoGVfAZIUKZW5kc3RyZWFtCmVuZG9iagoKMTYgMCBvYmoKPDwKL1NpemUgMTcKL1Jvb3QgMiAwIFIKL0luZm8gMyAwIFIKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL1R5cGUgL1hSZWYKL0xlbmd0aCA2NwovVyBbIDEgMiAyIF0KL0luZGV4IFsgMCAxNyBdCj4+CnN0cmVhbQp4nCXJQRGAMBBD0Z9tC5wAU3hBBQYqCSeYKZvp5c38BBgjOMDIhCniBPHMo0o9M7aZzSwqV271Nm/S9mT94AcTJgYfCmVuZHN0cmVhbQplbmRvYmoKCnN0YXJ0eHJlZgoyMDEwCiUlRU9G",
"basePdf": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main part of what I did in this PR is that I made it so that we can set it with a new type called BlankPdf instead of PDF data in basePdf.

Copy link
Collaborator

@peteward peteward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, some minor comments

@hand-dot hand-dot merged commit 380842c into v4 Jan 3, 2024
3 checks passed
This was referenced Jan 3, 2024
@hand-dot hand-dot deleted the base-pdf-type branch January 9, 2024 05:12
@vpn-dev
Copy link

vpn-dev commented Jan 19, 2024

@hand-dot i am not seeing any option to add pages while in designer, can you help me with it

hand-dot added a commit that referenced this pull request Feb 24, 2024
* TMP

* Minor fix

* TMP

* IMPL Support adding new pages to template #111

* Fix test

* Minor fix

* IMPL padding behavior

* Update snapshot

* TMP

* Minor fix

* Update snapshot

* TMP

* add i18n

* TMP

* remove option from BlankPdf.padding

* Minor fix

* Minor fix

* format
hand-dot added a commit that referenced this pull request Apr 11, 2024
* Reconsider the internal data types and the template types (#389)

* Change SchemaForUI's data and readOnlyValue to content

* Fix bug

* Remove sampledata and instead always use content. & Use content regardless of readOnly or not. & Eliminate defaultValue and replace it with always using content.

* Change website template

* Fix placeholder bug

* Change generator test template

* Change content to optional

* Move getInputFromTemplate to common

* Remove columns

* Fix test

* move dynamictable.excalidraw

* remove idea dir

* New basePdf type and Support adding new pages to template (#394)

* Minor fix

* IMPL Support adding new pages to template #111

* Fix test

* Minor fix

* IMPL padding behavior

* Update snapshot

* Minor fix

* Update snapshot

* add i18n

* remove option from BlankPdf.padding

* Minor fix

* Minor fix

* format

* Add changeSchemas unit test (#403)

* Minor fix

* Add a version number to pdfme template from V4 onwards (#404)

* Impl

* Minor fix

* Padding move width (#407)

* Refactor position and size handling in helper.ts

* Fix bug

* Add DynamicTable Schema #332 (#408)

* [tmp] add some comment

* Update snapshot

* Add deploy-table script to package.json

* add new template for playground

* bug fix for form

* fix cell editing bug

* Fix Adding rows doesn't change the overall height of the table

* fix padding problem

* Fix build error

* Fix bug

* Minor fix

* Fix New lines not reflecting correctly

* minor fix

* Minor fix

* Change tableStyles def

* add i18n

* small bugfix

* FIx some TODO

* Remove japanese comment

* Minor fix

* Fix infinity loom for form

* fix save inputs bug

* fix window resize bug

* add skip for failing test and update snapshot

* Minor fix

* add presets for playground

* Minor fix

* Reconsider the internal data types and the template types (#389)

* Change SchemaForUI's data and readOnlyValue to content

* Fix bug

* Remove sampledata and instead always use content. & Use content regardless of readOnly or not. & Eliminate defaultValue and replace it with always using content.

* Change website template

* Fix placeholder bug

* Change generator test template

* Change content to optional

* Move getInputFromTemplate to common

* Remove columns

* Fix test

* move dynamictable.excalidraw

* remove idea dir

* New basePdf type and Support adding new pages to template (#394)

* Minor fix

* IMPL Support adding new pages to template #111

* Fix test

* Minor fix

* IMPL padding behavior

* Update snapshot

* Minor fix

* Update snapshot

* add i18n

* remove option from BlankPdf.padding

* Minor fix

* Minor fix

* format

* Add changeSchemas unit test (#403)

* Minor fix

* Add a version number to pdfme template from V4 onwards (#404)

* Impl

* Minor fix

* Padding move width (#407)

* Refactor position and size handling in helper.ts

* Fix bug

* Add DynamicTable Schema #332 (#408)

* [tmp] add some comment

* Update snapshot

* Add deploy-table script to package.json

* add new template for playground

* bug fix for form

* fix cell editing bug

* Fix Adding rows doesn't change the overall height of the table

* fix padding problem

* Fix build error

* Fix bug

* Minor fix

* Fix New lines not reflecting correctly

* minor fix

* Minor fix

* Change tableStyles def

* add i18n

* small bugfix

* FIx some TODO

* Remove japanese comment

* Minor fix

* Fix infinity loom for form

* fix save inputs bug

* fix window resize bug

* add skip for failing test and update snapshot

* Minor fix

* add presets for playground

* Minor fix

* Minor fix

* Update imports and fix font rendering

* Add a Left Sidebar for Placing Schemas #400 (#452)

* Remove original 'Add new field' Button

* add icon

* FIx drag position bug

* Minor fix

* Fix sidebar position

* Update snapshot

* Minor fix

* Update packages/ui/src/components/Designer/index.tsx

Co-authored-by: Peter Ward <pete@pennyblack.io>

---------

Co-authored-by: Peter Ward <pete@pennyblack.io>

* Fix test

* Improve left sidebar icon drop placement accuracy (#454)

* Fix Spanish translations for v4 (#463)

* Fix #431

* V4 (#467)

* feat: add french language

* feat: relecture

* feat: add french language

---------

Co-authored-by: regis <regis>

* Add French language option to playground

* rename table export name to tableBeta

---------

Co-authored-by: Peter Ward <pete@pennyblack.io>
Co-authored-by: Iker Diez <32014358+ikerd@users.noreply.github.com>
Co-authored-by: Régis <regis.charnace@leandco.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants