/    Sign up×
Community /Pin to ProfileBookmark

FPDF Envelope orientation

Have used FPDF many times for normal letter-sized printing but I am now having an issue with a #10 Envelope. While the printer tells you to insert envelopes a certain way and that’s what I have done, for some reason FPDF won’t print them the way the envelope is oriented but rather prints them upside down. To solve this I would have to remember to turn my envelopes around every time I used this application and I’m trying to avoid that.

Has anyone figured out a work-around for this problem?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 07.2022 — Maybe you can use the 3rd param of [u][addPage()](http://www.fpdf.org/en/doc/addpage.htm)[/u] to rotate it 180 degrees? It's been years since I touched FPDF, so that's just the best search result I found -- don't think I've ever tried it..
Copy linkTweet thisAlerts:
@ginerjmauthorFeb 07.2022 — Tried that (new to me!) and it didn't work. The pdf goes to the print screen in a different orientation but when I click on the little icon for printing and select the paper size it print exactly the opposite of what it should print no matter the orientation on the screen is.
Copy linkTweet thisAlerts:
@ginerjmauthorFeb 07.2022 — I just tried to save the doc (pdf) and then to open it with adobe reader. It prints perfectly except it is in some much smaller font that is nothing like what it looks like on-screen. Hmm......
Copy linkTweet thisAlerts:
@NogDogFeb 07.2022 — No suggestions, but I share your pain. I remember doing a "little" free-lance project a decade or so ago to basically create a PDF of a "bank check" (even including the font they use for the account and routing numbers). I'm pretty sure I spent at least 3 times the amount of time I thought I'd need (and pretty sure I used FPDF for it).

I hate PDF, possibly more than I hate SOAP/XML. ;)
Copy linkTweet thisAlerts:
@ginerjmauthorFeb 07.2022 — I am pretty comfortable with FPDF, even after a bit of time away. But never having done envelopes before this is confusing. Let me run this by:

I set the FPDF page output to be Portrait and Letter size. Then when the pdf output is sent to the client it looks good. Then I click on the print button and change the paper to Envelope #10 and everything prints just like I want - except it is 180 degrees off.

I'm guessing that I am going to have to put out a JS alert when I click the 'Make PDF' button that reminds me to rotate my envelope tray.
×

Success!

Help @ginerjm spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...