Skip to content

Dim to string conversion - always add "points" #898

@zollybig

Description

@zollybig

types.go

func (d Dim) String() string {
return fmt.Sprintf("%fx%f points", d.Width, d.Height)

}
on any printing even after ToMillimetres(), ToCentemetres() or ToInches() prints " points" after size
for i:=0; i < len(dims); i++ {
fmt.Println(dims[i].ToMillimetres())

prints
297.038889x209.902778 points
297.038889x209.902778 points
210.015667x297.010667 points
210.015667x297.010667 points
210.015667x297.010667 points
210.015667x297.010667 points
210.001556x297.000083 points
210.001556x297.000083 points
210.255556x297.038889 points
210.255556x297.038889 points
210.255556x297.038889 points

As You can see dimensions in mm, but it prints " points" after dimension

Thank you for submitting a possible bug!

Please ensure the following:

  • Your issue is based on the latest commit
  • State your OS and OS version
  • When reporting a problem with a specific PDF input file please avoid stating the organization responsible for the PDFWriter - just refer to the PDFWriter

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions