yWorks / svg2pdf.js

A javascript-only SVG to PDF conversion utility that runs in the browser. Brought to you by yWorks - the diagramming experts
MIT License
654 stars 100 forks source link

Incorrect PDF file dimensions after export. #134

Closed Denyllon closed 4 years ago

Denyllon commented 4 years ago

Describe the bug After setting the width and hight values of expected PDF file, getting the pdf where always a bigger value is taken as horizontal dimension.

To Reproduce

  1. Open the example: https://jsfiddle.net/BlackLabel/168cukn4/
  2. Look at the width and height values set before exporting
  3. Open exported PDF file and look on its form (landscape).

Expected behavior Exported PDF should always have dimensions equal to passed values

Desktop (please complete the following information):

HackbrettXXX commented 4 years ago

That's in fact intended behavior, although if you ask me, the orientation parameter should be respected even if the dimensions don't match the orientation.

Denyllon commented 4 years ago

Didn't know the parameter which specifies orientation exists. You're right, closing the issue.