Skip to content

Commit 9bbb4ec

Browse files
committed
Fix top/bottom margins with taller letterhead images (Issue #375)
1 parent 7a8248c commit 9bbb4ec

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- Fixed a buffer underflow issue (Issue #370)
77
- Fixed PDF page numbers (Issue #371)
88
- Added support for a new `L` header/footer format (`$LETTERHEAD`), which
9-
inserts a letterhead image at its full size (Issue #372, Issue #373)
9+
inserts a letterhead image at its full size (Issue #372, Issue #373,
10+
Issue #375)
1011
- Updated the build documentation (Issue #374)
1112

1213

htmldoc/ps-pdf.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,13 @@ pspdf_export(tree_t *document, /* I - Document to export */
760760
{
761761
if (Header[pos] &&
762762
(strstr(Header[pos], "$IMAGE") != NULL ||
763-
strstr(Header[pos], "$HFIMAGE") != NULL))
763+
strstr(Header[pos], "$HFIMAGE") != NULL ||
764+
strstr(Header[pos], "$LETTERHEAD") != NULL))
764765
temp_adjust = image_adjust;
765766
else if (Header1[pos] &&
766767
(strstr(Header1[pos], "$IMAGE") != NULL ||
767-
strstr(Header1[pos], "$HFIMAGE") != NULL))
768+
strstr(Header1[pos], "$HFIMAGE") != NULL ||
769+
strstr(Header1[pos], "$LETTERHEAD") != NULL))
768770
temp_adjust = image_adjust;
769771
else if (Header[pos] || Header1[pos])
770772
temp_adjust = (float)(2 * HeadFootSize);
@@ -782,7 +784,8 @@ pspdf_export(tree_t *document, /* I - Document to export */
782784
{
783785
if (Footer[pos] &&
784786
(strstr(Footer[pos], "$IMAGE") != NULL ||
785-
strstr(Footer[pos], "$HFIMAGE") != NULL))
787+
strstr(Footer[pos], "$HFIMAGE") != NULL ||
788+
strstr(Footer[pos], "$LETTERHEAD") != NULL))
786789
temp_adjust = image_adjust;
787790
else if (Footer[pos])
788791
temp_adjust = (float)(2 * HeadFootSize);

0 commit comments

Comments
 (0)