Forum Discussion
Creating downloadable pdf files in Storyline - an update on earlier methods
𝖳𝗁𝖾𝗋𝖾 𝗁𝖺𝗏𝖾 𝖻𝖾𝖾𝗇 𝗆𝖺𝗇𝗒 𝖾𝗑𝖼𝖾𝗅𝗅𝖾𝗇𝗍 𝗉𝗈𝗌𝗍𝗌 𝗈𝗏𝖾𝗋 𝗍𝗁𝖾 𝗒𝖾𝖺𝗋𝗌 𝗈𝗇 𝖼𝗋𝖾𝖺𝗍𝗂𝗇𝗀 𝗉𝖽𝖿 𝖿𝗂𝗅𝖾𝗌 𝖻𝗒 𝗎𝗌𝗂𝗇𝗀 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝖿𝗋𝗈𝗆 𝗐𝗂𝗍𝗁𝗂𝗇 𝖲𝗍𝗈𝗋𝗒𝗅𝗂𝗇𝖾 (𝖾.𝗀. Saving Storyline Variables to a PDF - Articulate Storyline Discussions - E-Learning Heroes) 𝖺𝗇𝖽 𝖨 𝗁𝖺𝗏𝖾 𝗁𝖺𝖽 𝗁𝖾𝗅𝗉 𝖿𝗋𝗈𝗆 𝗆𝖺𝗇𝗒 𝗁𝖾𝗋𝗈𝖾𝗌 𝗈𝗇 𝗍𝗁𝗂𝗌 𝗌𝗂𝗍𝖾 𝗐𝗁𝖾𝗇 𝖨 𝗐𝖺𝗌 𝗂𝗇𝗂𝗍𝗂𝖺𝗅𝗅𝗒 𝗍𝗋𝗒𝗂𝗇𝗀 𝗍𝗈 𝖿𝗂𝗀𝗎𝗋𝖾 𝗂𝗍 𝗈𝗎𝗍 𝖿𝗈𝗋 𝗆𝗒𝗌𝖾𝗅𝖿.
𝖬𝗈𝗌𝗍 𝗈𝖿 𝗍𝗁𝖾 𝖺𝗋𝗍𝗂𝖼𝗅𝖾𝗌 (𝗅𝗂𝗄𝖾 𝗍𝗁𝖾 𝗈𝗇𝖾 𝖺𝖻𝗈𝗏𝖾) 𝖺𝗋𝖾 𝖿𝖺𝗂𝗋𝗅𝗒 𝗈𝗅𝖽 𝗇𝗈𝗐 𝖺𝗇𝖽 𝖺𝖽𝗏𝗈𝖼𝖺𝗍𝖾 𝗎𝗌𝗂𝗇𝗀 𝗍𝗁𝖾 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝖼𝗈𝖽𝖾 𝗅𝗂𝖻𝗋𝖺𝗋𝗒 "𝗃𝗌𝖯𝖽𝖿". 𝖠 𝗍𝗒𝗉𝗂𝖼𝖺𝗅 𝖺𝗉𝗉𝗋𝗈𝖺𝖼𝗁 𝗐𝗈𝗎𝗅𝖽 𝖻𝖾 𝗍𝗈 𝖼𝖺𝗉𝗍𝗎𝗋𝖾 𝗒𝗈𝗎𝗋 𝗅𝖾𝖺𝗋𝗇𝖾𝗋'𝗌 𝗂𝗇𝗉𝗎𝗍 𝗎𝗌𝗂𝗇𝗀 𝗍𝖾𝗑𝗍 𝖾𝗇𝗍𝗋𝗒 𝗏𝖺𝗋𝗂𝖺𝖻𝗅𝖾𝗌 𝗂𝗇 𝖲𝗍𝗈𝗋𝗒𝗅𝗂𝗇𝖾 - 𝖺𝗍 𝗍𝗁𝖾 𝖾𝗇𝖽 𝗈𝖿 𝗍𝗁𝖾 𝖼𝗈𝗎𝗋𝗌𝖾 𝗒𝗈𝗎 𝗂𝗇𝖼𝗅𝗎𝖽𝖾 𝖺 𝖻𝗎𝗍𝗍𝗈𝗇 𝗍𝗁𝖺𝗍 𝗍𝗋𝗂𝗀𝗀𝖾𝗋𝗌 𝗌𝗈𝗆𝖾 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗐𝗁𝗂𝖼𝗁 𝗐𝗈𝗎𝗅𝖽 𝗍𝗁𝖾𝗇 𝗋𝖾𝗍𝗋𝗂𝖾𝗏𝖾 𝗍𝗁𝖾 𝖲𝗍𝗈𝗋𝗒𝗅𝗂𝗇𝖾 𝗏𝖺𝗋𝗂𝖺𝖻𝗅𝖾𝗌, 𝗋𝖾𝖺𝖽 𝗂𝗇 𝖺 𝗉𝗇𝗀 𝗈𝗋 𝗃𝗉𝗀 𝗂𝗆𝖺𝗀𝖾 𝗈𝖿 𝖺 𝗉𝖽𝖿 𝖿𝗂𝗅𝖾 𝗉𝖺𝗀𝖾, 𝗂𝗇𝗌𝖾𝗋𝗍 𝗍𝗁𝖾 𝗋𝖾𝗊𝗎𝗂𝗋𝖾𝖽 𝗍𝖾𝗑𝗍 𝖺𝗍 𝗍𝗁𝖾 𝖺𝗉𝗉𝗋𝗈𝗉𝗋𝗂𝖺𝗍𝖾 𝗑 𝖺𝗇𝖽 𝗒 𝖼𝗈𝗈𝗋𝖽𝗂𝗇𝖺𝗍𝖾𝗌 𝗈𝗇 𝗍𝗁𝖾 𝗉𝖺𝗀𝖾, 𝖺𝗇𝖽 𝗍𝗁𝖾𝗇 𝖼𝖺𝗅𝗅 𝖺 𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇 𝗍𝗈 "𝗌𝖺𝗏𝖾" 𝗍𝗁𝖾 𝗋𝖾𝗌𝗎𝗅𝗍𝖺𝗇𝗍 𝖼𝗈𝗆𝗉𝗅𝖾𝗍𝖾𝖽 𝗉𝖽𝖿.
𝖳𝗁𝖾 𝗅𝖾𝖺𝗋𝗇𝖾𝗋 (𝖽𝖾𝗉𝖾𝗇𝖽𝗂𝗇𝗀 𝗈𝗇 𝗍𝗁𝖾𝗂𝗋 𝖻𝗋𝗈𝗐𝗌𝖾𝗋) 𝗐𝗈𝗎𝗅𝖽 𝖻𝖾 𝗉𝗋𝖾𝗌𝖾𝗇𝗍𝖾𝖽 𝗐𝗂𝗍𝗁 𝖺𝗇 𝗈𝗉𝗍𝗂𝗈𝗇 𝗍𝗈 '𝗌𝖺𝗏𝖾' 𝗈𝗋 '𝖽𝗈𝗐𝗇𝗅𝗈𝖺𝖽' 𝗍𝗁𝖾 𝖿𝗂𝗅𝖾.
𝖢𝗋𝖾𝖺𝗍𝗂𝗇𝗀 𝗆𝗎𝗅𝗍𝗂𝗉𝗅𝖾 𝗉𝖺𝗀𝖾 𝗉𝖽𝖿'𝗌 𝗐𝖺𝗌 𝖼𝗈𝗆𝗉𝗅𝗂𝖼𝖺𝗍𝖾𝖽 - 𝖻𝗎𝗍 𝖺𝗅𝗌𝗈 𝗉𝗈𝗌𝗌𝗂𝖻𝗅𝖾. 𝖨'𝗏𝖾 𝗉𝖾𝗋𝗌𝗈𝗇𝖺𝗅𝗅𝗒 𝖽𝗈𝗇𝖾 𝗆𝖺𝗇𝗒 𝗌𝗎𝖼𝖼𝖾𝗌𝗌𝖿𝗎𝗅 𝗉𝗋𝗈𝗃𝖾𝖼𝗍𝗌 𝗎𝗌𝗂𝗇𝗀 𝗍𝗁𝗂𝗌 𝖺𝗉𝗉𝗋𝗈𝖺𝖼𝗁 𝖿𝗈𝗋 𝖽𝗈𝗐𝗇𝗅𝗈𝖺𝖽𝗂𝗇𝗀 𝖼𝗈𝗎𝗋𝗌𝖾 𝗇𝗈𝗍𝖾𝗌, 𝗌𝗎𝗋𝗏𝖾𝗒 𝗋𝖾𝗌𝗎𝗅𝗍𝗌 𝗈𝗋 𝖼𝖾𝗋𝗍𝗂𝖿𝗂𝖼𝖺𝗍𝖾𝗌.
𝗦𝗼 𝘄𝗵𝘆 𝗮𝗺 𝗜 𝗻𝗼𝘄 𝗮𝗱𝘃𝗼𝗰𝗮𝘁𝗶𝗻𝗴 𝗮 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗮𝗽𝗽𝗿𝗼𝗮𝗰𝗵?
𝖶𝖾𝗅𝗅, 𝗅𝗂𝗄𝖾 𝗍𝗁𝖾 𝖺𝗋𝗍𝗂𝖼𝗅𝖾𝗌, 𝗃𝗌𝖯𝖽𝖿 𝗂𝗌 𝖺 𝗅𝗂𝖻𝗋𝖺𝗋𝗒 𝗍𝗁𝖺𝗍 𝗁𝖺𝗌 𝖻𝖾𝖾𝗇 𝖺𝗋𝗈𝗎𝗇𝖽 𝗌𝗈𝗆𝖾 𝗍𝗂𝗆𝖾. 𝖨𝗍 𝖽𝗈𝖾𝗌 𝖺 𝗀𝗈𝗈𝖽 𝗃𝗈𝖻 𝖺𝗇𝖽 𝗍𝗁𝗈𝗎𝗌𝖺𝗇𝖽𝗌 𝗈𝖿 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗉𝗋𝗈𝗀𝗋𝖺𝗆𝗆𝖾𝗋𝗌 𝗋𝖾𝗅𝗒 𝗈𝗇 𝗂𝗍. 𝖨𝗍 𝖼𝖺𝗇 𝖼𝗋𝖾𝖺𝗍𝖾, 𝖺𝗇𝖽 𝗌𝖺𝗏𝖾 𝗉𝖽𝖿'𝗌 𝗃𝗎𝗌𝗍 𝖿𝗂𝗇𝖾. 𝖧𝗈𝗐𝖾𝗏𝖾𝗋, 𝖺 𝗆𝗈𝗋𝖾 𝗋𝖾𝖼𝖾𝗇𝗍 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝗅𝗂𝖻𝗋𝖺𝗋𝗒 "𝗉𝖽𝖿-𝗅𝗂𝖻" 𝗁𝖺𝗌 𝖺 𝖫𝖮𝖳 𝗆𝗈𝗋𝖾 𝖿𝗎𝗇𝖼𝗍𝗂𝗈𝗇𝖺𝗅𝗂𝗍𝗒. 𝖨𝗇 𝗉𝖺𝗋𝗍𝗂𝖼𝗎𝗅𝖺𝗋, 𝗂𝗍 𝖼𝖺𝗇
𝗆𝗈𝖽𝗂𝖿𝗒 𝖾𝗑𝗂𝗌𝗍𝗂𝗇𝗀 𝗉𝖽𝖿'𝗌
𝖼𝗋𝖾𝖺𝗍𝖾, 𝖿𝗂𝗅𝗅 𝖺𝗇𝖽 𝖿𝗅𝖺𝗍𝗍𝖾𝗇 𝗉𝖽𝖿 𝖿𝗈𝗋𝗆𝗌
𝖺𝖽𝖽, 𝗂𝗇𝗌𝖾𝗋𝗍 𝖺𝗇𝖽 𝗋𝖾𝗆𝗈𝗏𝖾 𝗉𝖺𝗀𝖾𝗌 𝖿𝗋𝗈𝗆 𝖺 𝗉𝖽𝖿
...𝖺𝗇𝖽 𝖺 𝗐𝗁𝗈𝗅𝖾 𝗅𝗈𝗍 𝗆𝗈𝗋𝖾.
𝖳𝗁𝗂𝗌 𝗆𝖾𝖺𝗇𝗌 𝗍𝗁𝖺𝗍 𝗂𝗇𝗌𝗍𝖾𝖺𝖽 𝗈𝖿 𝗉𝖺𝗂𝗇𝖿𝗎𝗅𝗅𝗒 𝗐𝗈𝗋𝗄𝗂𝗇𝗀 𝗈𝗎𝗍 𝗐𝗁𝖾𝗋𝖾 𝗒𝗈𝗎 𝗇𝖾𝖾𝖽 𝗍𝗈 𝗉𝗅𝖺𝖼𝖾 𝗍𝗁𝖾 𝗍𝖾𝗑𝗍 𝗈𝗇 𝖾𝖺𝖼𝗁 𝗉𝖺𝗀𝖾 𝗈𝖿 𝗍𝗁𝖾 𝗉𝖽𝖿, 𝗒𝗈𝗎 𝖼𝖺𝗇 𝗌𝗂𝗆𝗉𝗅𝗒 𝖽𝖾𝗌𝗂𝗀𝗇 𝖺 𝗉𝖽𝖿 𝖿𝗈𝗋𝗆, 𝗇𝖺𝗆𝖾 𝗍𝗁𝖾 𝖿𝗂𝖾𝗅𝖽𝗌 𝖺𝗇𝖽 𝗍𝗁𝖾𝗇 𝗎𝗌𝖾 𝗍𝗁𝖾 𝗋𝖾𝗍𝗋𝗂𝖾𝗏𝖾𝖽 𝗏𝖺𝗋𝗂𝖺𝖻𝗅𝖾𝗌 𝖿𝗋𝗈𝗆 𝖲𝗍𝗈𝗋𝗒𝗅𝗂𝗇𝖾 𝗍𝗈 '𝖿𝗂𝗅𝗅' 𝗈𝗎𝗍 𝗍𝗁𝖾 𝖿𝗈𝗋𝗆.
𝖶𝖾 𝗁𝖺𝗏𝖾 𝖻𝖾𝖾𝗇 𝖺𝗐𝖺𝗋𝖾 𝗈𝖿 𝗉𝖽𝖿-𝗅𝗂𝖻 𝖿𝗈𝗋 𝗌𝗈𝗆𝖾 𝗍𝗂𝗆𝖾 𝖻𝗎𝗍 𝗇𝖾𝗏𝖾𝗋 𝖿𝗈𝗎𝗇𝖽 𝗍𝗁𝖾 𝗍𝗂𝗆𝖾 𝗍𝗈 𝖽𝗈 𝖺𝗇𝗒𝗍𝗁𝗂𝗇𝗀 𝖺𝖻𝗈𝗎𝗍 𝗂𝗍 (𝗎𝗌𝗂𝗇𝗀 𝗍𝗁𝖾 𝗈𝗅𝖽 𝗉𝗋𝗈𝗀𝗋𝖺𝗆𝗆𝖾𝗋𝗌' 𝖺𝖽𝖺𝗀𝖾 "𝗂𝖿 𝗒𝗈𝗎𝗋 𝖼𝗈𝖽𝖾 𝗂𝗌 𝗐𝗈𝗋𝗄𝗂𝗇𝗀 𝖽𝗈𝗇'𝗍 𝗍𝗋𝗒 𝖺𝗇𝖽 𝖿𝗂𝗑 𝗂𝗍"). 𝖮𝗏𝖾𝗋 𝗍𝗁𝖾 𝖢𝗁𝗋𝗂𝗌𝗍𝗆𝖺𝗌 𝖻𝗋𝖾𝖺𝗄 𝗂𝗇-𝖻𝖾𝗍𝗐𝖾𝖾𝗇 𝖼𝖾𝗅𝖾𝖻𝗋𝖺𝗍𝗂𝗈𝗇𝗌 (𝖺𝗇𝖽 𝗉𝗋𝗈𝖻𝖺𝖻𝗅𝗒 𝖿𝗎𝖾𝗅𝖾𝖽 𝖻𝗒 𝗍𝗈𝗈 𝗆𝗎𝖼𝗁 𝖿𝖾𝗌𝗍𝗂𝗏𝖾 𝗌𝗉𝗂𝗋𝗂𝗍 𝗈𝗇 𝗈𝖼𝖼𝖺𝗌𝗂𝗈𝗇𝗌) 𝗐𝖾 𝗐𝖾𝗋𝖾 𝖺𝖻𝗅𝖾 𝗍𝗈 𝗀𝖾𝗍 𝖺 𝗇𝖾𝗐 (𝖻𝗎𝗍 𝗏𝖾𝗋𝗒 𝖻𝖺𝗌𝗂𝖼) 𝖽𝖾𝗆𝗈𝗇𝗌𝗍𝗋𝖺𝗍𝗂𝗈𝗇 𝗐𝗈𝗋𝗄𝗂𝗇𝗀 𝗐𝗁𝗂𝖼𝗁 𝖼𝖺𝗇 𝖻𝖾 𝗏𝗂𝖾𝗐𝖾𝖽 𝗁𝖾𝗋𝖾:
https://demo5.profilelearning.com
𝖮𝗄, 𝗍𝗁𝗂𝗌 𝗂𝗌𝗇'𝗍 𝖺 𝗏𝖾𝗋𝗒 𝗂𝗆𝗉𝗋𝖾𝗌𝗌𝗂𝗏𝖾 𝖽𝖾𝗆𝗈 - 𝖻𝗎𝗍 𝗐𝖾 𝖺𝗋𝖾 𝗐𝗈𝗋𝗄𝗂𝗇𝗀 𝗈𝗇 𝗂𝗍 - 𝖺𝗇𝖽 𝗐𝗂𝗅𝗅 𝗉𝗎𝖻𝗅𝗂𝗌𝗁 𝗍𝗐𝗈 𝗈𝗋 𝗍𝗁𝗋𝖾𝖾 𝗆𝗈𝗋𝖾 𝖺𝗋𝗍𝗂𝖼𝗅𝖾𝗌 𝖾𝗑𝗉𝗅𝖺𝗂𝗇𝗂𝗇𝗀 𝖺 𝖻𝗂𝗍 𝗆𝗈𝗋𝖾 𝖺𝖻𝗈𝗎𝗍 𝗍𝗁𝗂𝗌 𝖼𝗈𝖽𝖾 𝗅𝗂𝖻𝗋𝖺𝗋𝗒 𝖺𝗇𝖽 𝖺𝗅𝗌𝗈 𝖺𝖻𝗈𝗎𝗍 '𝗆𝗈𝖽𝖾𝗋𝗇 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍'
𝗝𝘂𝘀𝘁 𝘁𝗼 𝘄𝗵𝗲𝘁 𝘆𝗼𝘂𝗿 𝗮𝗽𝗽𝗲𝘁𝗶𝘁𝗲 𝗮 𝗹𝗶𝘁𝘁𝗹𝗲 𝗳𝘂𝗿𝘁𝗵𝗲𝗿 𝘁𝗼 𝗯𝗼𝗼𝗸𝗺𝗮𝗿𝗸 𝘁𝗵𝗶𝘀 𝗽𝗼𝘀𝘁 - 𝘄𝗲 𝗮𝗹𝘀𝗼 𝗵𝗮𝘃𝗲 𝘁𝗵𝗲 𝗮𝗯𝗼𝘃𝗲 𝗱𝗲𝗺𝗼𝗻𝘀𝘁𝗿𝗮𝘁𝗶𝗼𝗻 𝘄𝗼𝗿𝗸𝗶𝗻𝗴 𝗶𝗻 𝗥𝗜𝗦𝗘....
90 Replies
- JohnCooper-be3cCommunity Member
Just a quick thought. The NotesTemplate.pdf file must be a pdf form file as the JavaScript reads the field information from the file. You could just check the file opens OK as a form... I doubt that is the problem - but worth checking...
- JohnCooper-be3cCommunity Member
Hi Sarah
Sorry you are having difficulties with the demo. I must admit I hadn't tried it in Articulate Review, as I load demos on my own cloud server - but I just tested it and it seemed to work fine. As Phil says, the 403 error indicates there's some problem opening the file rather than the file being missing.
My zip file content looks like this:
with the "Notes Template.pdf" in the root folder with the story,html file.
I'm not sure what else I can suggest.
If the problem persists I can maybe record a short video of my screen as I load the demo to Review. If that would help?
- PhilMayorSuper Hero
403 the resource is missing did it upload?
- SarahNewman-804Community Member
It looks like it uploaded just fine? I did "Upload New Version" with the zip file, which I had already pasted the PDF file into. The note taker opens up just fine, but when I enter text and hit submit, nothing happens.
- PhilMayorSuper Hero
Sorry my mistake 403 is forbidden access. So it maybe being blocked. You can check in the console if the file is there.
Sent from my iPhone
- SarahNewman-804Community Member
I found the console and looked at the Storyline file in Review. I see an error saying that it failed to load the PDF "Failed to load resource: the server responded with a status of 403 ()" and there's a web address. I clicked it, which led to this message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>Q4NR5B9HSKPHYTRB</RequestId><HostId>gM7J3TsxetllsJbjTfxVjvg3CSCbJtSyB+n3Xl9x6UGwJZwLQoVimuZBn9fYhHNymhHqPCPmUrI=</HostId></Error> - JohannesBurkeCommunity Member
I recommend doing the following:
- Open console (on your browser (e.g. Chrome)).
- Check the error message (you'll likely receive).
- Copy your Java Script code into Chat GPT and ask Chat GPT to debug it.
I've had some pretty cool experiences with Chat GPT this way. I'd say it's quite likely it'll be able to help you, too.
- PhilMayorSuper Hero
Agree about opening the console.
Chat GPT may solve it if not post back
- JohannesBurkeCommunity Member
Still working here, but I'm using a different PDF library.
- SarahNewman-804Community Member
Is anyone else having issues with this suddenly not working in Review? I haven't loaded to my LMS to test there, but I've tried uploading the original NoteTaker story with the original PDF in its root folder into Review and the button does nothing now. That makes me think that it isn't a problem with the JavaScript in the course I'm working on. Thoughts?
- PhilMayorSuper Hero
Have you checked the console for an error?
Sent from my iPhone- SarahNewman-804Community Member
I'm a super beginner at programming, so I'm not sure how to do that. What I know is that I made no changes to the storyline file or the PDF that I downloaded from the author and when I publish the Storyline file for Review (adding PDF to zip file), the Submit button does nothing.
- JohannesBurkeCommunity Member
Hi there,
I've been trying to create this PDF here and have been able successfully tweak it.
However, I've run into a separate issue: I was trying to flatten the PDF (so as to prevent it being changed after it was downloaded). However, this command didn't work (in my case):
form.flatten();
Does anyone know what can be done? Appreciate any support!
Thanks a lot,
John
- LearningSapiensCommunity Member
Thanks to John for the wonderful idea. I did tweak this a bit. My requirment was to just create a pdf with the user responses for many text entry boxes. However I am stuck at one point. Once the text overflows the page, how do I go to the next page? Any javascript experts who can help with this?
Here is the javascript code:
//Retrieve Player Variables
var player = GetPlayer();
learnerName = player.GetVar("name");
learnerEmail = player.GetVar("email");
learnerMessage = player.GetVar("message");
createPdf();
async function createPdf() {
await import("https://unpkg.com/pdf-lib@1.4.0/dist/pdf-lib.min.js")
const { PDFDocument, StandardFonts, rgb } = PDFLib;
// Create a new PDFDocument
const pdfDoc = await PDFDocument.create()
// Embed the Times Roman font
const timesRomanFont = await pdfDoc.embedFont(StandardFonts.TimesRoman)
// Add a blank page to the document
const page = pdfDoc.addPage()
// Get the width and height of the page
const { width, height } = page.getSize()
// Draw a string of text toward the top of the page
const fontSize = 30;
page.setFontSize(fontSize);
const startX = 50;
const maxWidth = width - 10;
const lineSpacer = 8;
let startY = height - 130;
const textContent = learnerName + ' ' + learnerEmail
+ ' ' + learnerMessage;
// page.setFontSize(fontSize);
//page.drawText(textContent,{x:startX, y:startY});
const lines = page.drawText(textContent, {
x: startX,
y: startY,
color: rgb(0, 0, 0),
maxWidth,
lineHeight: fontSize + 5
});
pdfDoc.addPage();
// Serialize the PDFDocument to bytes (a Uint8Array)
const pdfBytes = await pdfDoc.save()
// Trigger the browser to download the PDF document
download(pdfBytes, "Sample.pdf", "application/pdf");
}Thanks!
- JohnCooper-be3cCommunity Member
Hi Sarah - I'm not sure why the fields are appearing as "invisible" either. Just to clarify, we are talking about the output pdf that is created by your JavaScript code from your pdf form template? And the field you typed in during the Storyline is there - you just can't see it unless you click on it? But what you do see is a blue form entry box? How strange is that??
OK. I would start by looking at your pdf form template. Go to the offending fields and take a look at their 'Properties' (by right ciicking the field):
As you can see, there's quite a lot of options. I would see if there is anything unusual. It sounds to me like the field is set up incorrectly - I mean it's worth checking that it is a 'text field' not some kind of other field - like a 'button field'
But, to be honest, without the files, I'm just taking wild guesses!
Hope that does help though. If you have other fields in the pdf that do work compare the two fields that don't work to them.
Related Content
- 11 months ago
- 5 months ago