Skip to content

Error in paper size definition #225

@Sgkhour

Description

@Sgkhour

Hi, i was trying to debug an issue with lack of space around the footer of a page when i think i found the culprit . in PDFPageFormat+SizeConstants.swift, the page size defined is incorrect.

more specifically the height of usLetter
return CGSize(width: 612, height: 762) // 216 x 279 mm | 8.5 x 11.0 in
should be 792 (11x72) instead
return CGSize(width: 612, height: 792) // 216 x 279 mm | 8.5 x 11.0 in

and the width of usLedger
return CGSize(width: 720, height: 1224) // 279 x 432 mm | 11.0 x 17.0 in
should be 792 instead
return CGSize(width: 792, height: 1224) // 279 x 432 mm | 11.0 x 17.0 in

when i specified the document size
document.layout = PDFPageLayout(size: CGSize(width: 612, height: 792),...
the footer spacing was now properly aligned.

looks like an easy fix but i have never done pull requests before.. something new to learn
Sami

Metadata

Metadata

Assignees

Labels

WIPWork is in progressbug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions