parallax / jsPDF

Client-side JavaScript PDF generation for everyone.

Home Page:https://parall.ax/products/jspdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues in generated PDF for Angular Material Field

subodhgodbole opened this issue · comments

I have read and understood the contribution guidelines.

I am trying to use this library with my Angular project. However in the generated PDF I do not see Angular Material Field's Label value. In the PDF I can see Prefix, Postfix, and Hint, but not the Label, in both cases when appearance is "fill" or "outline". I also played with font color for label, but still it's not visible.

Value in text field also has issues, space is visible after each letter.

Here is running example using Stackblitz - https://stackblitz.com/edit/angular-html-2-pdf

Here it how this demo page looks like -
JSPDF-HTML

When there is value in text field, the labels are not seen in generated PDF, also there is space after each letter
JSPDF-PDF1

When there is no value in text field, the labels are seen in generated PDF
But labels are partially cut. And since value is not there "placeholder" is also seen, which is correct.
JSPDF-PDF2

Further I stumbled on on interesting thing - Actually labels are available in generated PDF, they are just not visible!
Using mouse, when I try to select the "blank area" above the text field in generated PDF, and right click and hit copy.
Then paste it somewhere like in notepad, I can see it pastes the label.
However, the value of label, I see every letter is duplicated (except first!), I see this for Label "First Name"
But this is not true for each label, For Label "Line 1", "Line 2", the letters are not duplicated.

JSPDF-PDF3

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.