Comments (8)
Thanks @edisonneza
Progressively journalled notes as I went through π
Still uncertain which parts of jsPDF
are documented as feature vs bug π itself :P - will see whether we get further (official) responses from their issue tracker - otherwise some of my drop-in types may have to do in the shortβto mediumβterm.
I added a comment to a font metrics issue to start (will find and reference back) with a sample of expected input/output interface shape)
Working things through - I will hopefully be able to incrementally separate it in a maintainable fashion to PR back
May be a while :S
from jspdf-invoice-template.
π―π³ lots of topics in a single issue haha. I will try to seprate them, or if you can it would be the best to create a PR if you're gonna do any fix or features. Tomorrow I will work on the fix of the other issue and publish the package. Thanks for the contribution!!
from jspdf-invoice-template.
Bouncing around ideas / discussion π
from jspdf-invoice-template.
Also I think the text alignment property may not be working due to this similar issue
and, on delving in, it looks like the text() function expects the align property within a settings object rather than as a direct string
export interface TextOptionsLight {
align?: "left" | "center" | "right" | "justify";
from jspdf-invoice-template.
This usage is different to the other times the function is used in the file
https://github.com/edisonneza/jspdf-invoice-template/blob/main/src/index.js#L477
/* no compile-time warning */
doc.text(
param.pageLabel + " " + i + " / " + doc.getNumberOfPages(),
docWidth - 20,
doc.internal.pageSize.height - 6
);
also noting a non-bug (for this repo) as I was wondering why doc.getPageWidth()
raised errors on transpile
var getPageWidth = (API.getPageWidth = function(pageNumber) {
pageNumber = pageNumber || currentPage;
return (
(pagesContext[pageNumber].mediaBox.topRightX -
pagesContext[pageNumber].mediaBox.bottomLeftX) /
scaleFactor
);
});
- this is actually a jsPDF bug where it is missing type declarations for some parts and not others.
A common issue in many longstanding js dependencies
from jspdf-invoice-template.
js vs the documented index.d.ts discrepancies get tedious to review as the footer did appear to be centered at the bottom
however,
the types expected a settings object instead of the string "center"
doc.text(
param.footer.text,
docWidth / 2,
docHeight - 10,
"center"
);
from jspdf-invoice-template.
^ Wondering if right
alignment is present for decimal currency fields as part of the table
from jspdf-invoice-template.
Added in my TODO list. Reopen it if anything else.
from jspdf-invoice-template.
Related Issues (20)
- Error message on Angular 13 HOT 13
- Add invoice level fields like TAX No, etc HOT 2
- Node.js - Image is undefined HOT 3
- Japanese language HOT 15
- Add a stamp HOT 2
- 1.4.0 invoice header is expecting string[] but demo site given as object[] HOT 2
- using blob , prepend an image and upload to firebase storage doesn't work, but saving locally works HOT 2
- Semi missing license HOT 1
- Generate 2 PDF Everytime HOT 2
- Using Data URLS for the Logo HOT 5
- Set row height/padding HOT 3
- For Loop Dynamic Rendering, Saves Only 10 Times HOT 2
- Invalid Hook Call HOT 2
- Possibility to add a new table or more HOT 1
- Possibility to add a table background color , header color or text color ? HOT 2
- Uncaught TypeError: t is undefined HOT 5
- Question HOT 1
- Trouble writing Arabic HOT 2
- Directly saving as PDF - Node HOT 1
- Adding Columns to Footer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jspdf-invoice-template.