Skip to content

A repro-code for a problem of phantomjs' PDF generation.

License

Notifications You must be signed in to change notification settings

mysticatea/phantomjs-problem

Repository files navigation

Repro-code for a problem of phantomjs PDF generation

On Windows 7 pro, if I configured a custom font size, I have gotten a wrong result of phantomjs' PDF generation.

configuration window for custom font size (in Japanese)

Probably this is the same window in English.

Repro Step

  1. npm install
  2. npm test
  3. Open result.pdf

It would print a bounding box of A4. The box size is specified in millimeters.

.bounding-box-of-A4 {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: calc(210mm - 1px);
    height: calc(297mm - 1px);
    padding: 4px;
    box-sizing: border-box;
    border: 3px solid red;
}

Then:

  • In the custom font size is 100% (default), it generated expected.pdf.
  • In the custom font size is 125%, it generated wrong.pdf. This is too small.

About

A repro-code for a problem of phantomjs' PDF generation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published