+1 vote

Hi community!

In my GT program (as probably many) the user answers a few questions and receives recommendations based on her answers.

For example, if a person answered A, send (or produce) a pdf explaining why the answer was right. If the answer was X, send a PDF explaining why the answer was wrong.

The recommendations are long, so right now I'm sending an email with a link to a personalized Guided Track program. This way, the user can access it in the future.

However, a few users asked to receive their information as an PDF to be able to print their recommendations.

Is there any way that's possible? Programatically personalize a PDF based on GT parameters?
Any ideas would be highly appreciated.

Thanks!

by (440 points)

2 Answers

+1 vote
Best answer

Following up on this, here is a blog post on how to generate a pdf using APITemplate.io from a GuidedTrack program: http://blog.guidedtrack.com/?p=560

by (3.6k points)
+1 vote

I don't know of any way to do this directly with GuidedTrack. But you could use *service to call external services to make it happen. (Search for "Markdown to PDF HTTP API" for examples. Update 2021-06-15: HosonZeis found https://apitemplate.io/, which looks nice.)

The question is, though: Why do your users need a PDF to print the recommendations? Do they not want to use the ‘print email’ feature of their email client?

by (1.1k points)
edited by

Hi rmoehn,

Thanks for your answer.
Regarding why people don't print the email, is because the email doesn't contain the content. It is too large to fit in an email, so the email is actually a link to a GT program with the content.
I'm not familiar with email lengths though, so this is an assumption. Do you think it's better to send everything into a single email?

I see! Well, how large is large? I wouldn't mind an email that is ten pages long, provided that it's formatted neatly and contains few images.

The GT program you link to so far has multiple pages, right? That's why one can't just print it from the browser?

Yes. It has 5 pages + a couple more to give feedback on the program.
To give a size perspective, right now the code has about 800 lines. Of course, not all characters are printed as the text is selected depending on the answers. So I'd say about 10.000 to 15.000 characters plus some pictures divided among those 5 pages.
As I write, this might not be too large. I saw in this stackoverflow post that Gmail clips the message at about 102kb, which is twice this size. So you're right, I should give it a try.

To add to the discussion, I also appreciate for the terms to search. I previously have searched myself but didn't get good results. Iterating on your idea, I found API Template that has a free tier. I didn't try but looks really promising. Thanks!

API Template looks nice!

The StackOverflow post is a bit misleading. If you follow the link, it says: ‘Gmail clips emails that have a message size larger than 102KB, and hides the full content behind a “View entire message” link.’ So even if an email is bigger than 102 kB, the rest will still be accessible.

Welcome to Guidedtrack Q&A, where you can ask questions and receive answers from other members of the community.
134 questions
144 answers
55 comments
40 users