{"id":32400,"date":"2026-11-14T01:55:51","date_gmt":"2026-11-14T01:55:51","guid":{"rendered":"https:\/\/umang.pk\/2026\/11\/14\/%d8%ac%d8%a7%d9%88%d8%a7-%d8%a7%d8%b3%da%a9%d8%b1%d9%be%d9%b9-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-%d9%be%db%8c-%da%88%db%8c-2\/"},"modified":"2026-11-14T01:55:53","modified_gmt":"2026-11-14T01:55:53","slug":"%d8%ac%d8%a7%d9%88%d8%a7-%d8%a7%d8%b3%da%a9%d8%b1%d9%be%d9%b9-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-%d9%be%db%8c-%da%88%db%8c-2","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/11\/14\/%d8%ac%d8%a7%d9%88%d8%a7-%d8%a7%d8%b3%da%a9%d8%b1%d9%be%d9%b9-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%d8%b1%d8%aa%db%92-%db%81%d9%88%d8%a6%db%92-%d9%be%db%8c-%da%88%db%8c-2\/","title":{"rendered":"\u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u067e\u0679 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0679\u0648\u0644 \u0645\u06cc\u06ba \u0628\u0631\u0627\u0624\u0632\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0627\u0645\u06cc\u062c \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u06a9\u06cc\u0633\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4"},"content":{"rendered":"\n<div id=\"\">\n<p>\u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u06a9\u0648\u0626\u06cc \u0648\u06cc\u0688\u06cc\u0648 \u0634\u0648\u0679 \u06a9\u0631\u06d2\u060c \u06a9\u0645\u0631\u0634\u0644 \u0634\u0648\u0679 \u06a9\u0631\u06d2\u060c \u06cc\u0627 \u06a9\u0633\u06cc \u06a9\u0627\u0645\u06a9 \u06a9\u0627 \u0622\u062e\u0631\u06cc \u0635\u0641\u062d\u06c1 \u06a9\u06be\u06cc\u0646\u0686\u06d2\u060c \u06a9\u0648\u0626\u06cc \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0645\u0646\u0635\u0648\u0628\u06c1 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631\u060c \u062a\u0631\u062a\u06cc\u0628 \u0633\u06d2 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u06af\u0626\u06cc\u060c \u0645\u062e\u062a\u0635\u0631 \u0646\u0648\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06cc\u06c1 \u06a9\u062a\u0646\u06cc \u062f\u06cc\u0631 \u062a\u06a9 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0644\u0648\u06af\u0648\u06ba \u06a9\u06d2 \u067e\u0627\u0633 \u0648\u06c1 \u062a\u0635\u0648\u06cc\u0631 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631\u060c \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0634\u0627\u0679\u0633\u060c \u06a9\u06be\u0631\u062f\u0631\u06d2 \u062e\u0627\u06a9\u06d2\u060c \u06cc\u0627 \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba AI \u0633\u06d2 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062f\u06c1 \u0641\u0631\u06cc\u0645 \u06c1\u06cc\u06ba\u06d4 \u062c\u0648 \u06a9\u0686\u06be \u0627\u0646 \u06a9\u06d2 \u067e\u0627\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u0648\u06c1 \u0627\u0646 \u0641\u0648\u0644\u0688\u0631\u0632 \u06a9\u0648 \u0635\u0627\u0641\u060c \u0646\u0645\u0628\u0631 \u0648\u0627\u0644\u06cc \u0634\u06cc\u0679\u0633 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u062a\u06cc\u0632 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2 \u062c\u0648 \u06a9\u0644\u0627\u0626\u0646\u0679\u0633 \u06a9\u0648 \u067e\u0631\u0646\u0679 \u06cc\u0627 \u0628\u06be\u06cc\u062c\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u0628\u0631\u0627\u0624\u0632\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0679\u0648\u0644 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u0633\u0627 \u06c1\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0627 \u0627\u06cc\u06a9 \u0633\u06cc\u0679 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u060c \u06c1\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0639\u0646\u0648\u0627\u0646\u060c \u062a\u0641\u0635\u06cc\u0644 \u0627\u0648\u0631 \u0648\u0642\u062a \u06a9\u06cc \u0645\u062f\u062a \u062f\u06cc\u06ba \u06af\u06d2\u060c \u0627\u06cc\u06a9 \u0644\u06d2 \u0622\u0624\u0679 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u060c \u0634\u06cc\u0679 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u060c \u0627\u0648\u0631 \u067e\u0631\u0646\u0679\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u0633\u0628 \u06a9\u0686\u06be \u0622\u067e \u06a9\u06d2 \u0628\u0631\u0627\u0624\u0632\u0631 \u0645\u06cc\u06ba \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0633\u0631\u0648\u0631 \u067e\u0631 \u0627\u067e \u0644\u0648\u0688 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0627\u06c1\u0645 \u06c1\u06d2 \u0627\u06af\u0631 \u0641\u0631\u06cc\u0645 \u0627\u06cc\u06a9 \u063a\u06cc\u0631 \u0645\u0637\u0628\u0648\u0639\u06c1 \u067e\u0631\u0648\u0688\u06a9\u0679 \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06cc\u0627 \u06a9\u0633\u0679\u0645\u0631 \u06a9\u0627 \u06a9\u0627\u0645 \u06c1\u06d2\u06d4<\/p>\n<p>\u0631\u0627\u0633\u062a\u06d2 \u0645\u06cc\u06ba\u060c \u0622\u067e \u0633\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u06a9\u0633 \u0637\u0631\u062d \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u0646\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0633 \u06a9\u06cc \u0637\u0631\u0641 \u062c\u06be\u06a9\u06cc \u06c1\u0648\u0626\u06cc \u06c1\u06d2\u060c \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u0644\u0648\u06af\u0648\u06ba \u06a9\u06cc \u062a\u0648\u0642\u0639 \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u0627\u060c \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0635\u0641\u062d\u0627\u062a \u0628\u0646\u0627\u0646\u0627\u060c \u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u0679\u06cc\u06a9\u0633\u0679 \u0644\u067e\u06cc\u0679\u0646\u0627\u060c IndexedDB \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0688\u0631\u0627\u0641\u0679 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u0646\u0627\u060c \u0627\u0648\u0631 PDFs \u0628\u0646\u0627\u0646\u0627 \u062c\u0648 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u0628\u0691\u0627 \u0628\u0646\u0627\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0622\u067e \u06a9\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u062a\u06cc\u0632 \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u06cc\u06c1 \u0679\u0648\u0644 AllInOneTools \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0646\u0627\u06cc\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1\u0627\u06ba \u06cc\u06c1 \u0627\u0645\u06cc\u062c \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688\u0632 \u06a9\u0648 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0627\u06cc\u06a9 \u0679\u0648\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0686\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u0636\u0645\u0648\u0646 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u0622\u0633\u0627\u0646 \u0648\u0631\u0698\u0646 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u062a\u06cc\u0646 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-what-well-cover\">\u062c\u0633 \u06a9\u0627 \u06c1\u0645 \u0627\u062d\u0627\u0637\u06c1 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/h2>\n<h2 id=\"heading-what-this-image-storyboard-tool-does-and-how-it-works\">\u06cc\u06c1 \u0627\u0645\u06cc\u062c \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0679\u0648\u0644 \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06cc\u06c1 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/h2>\n<p>\u06cc\u06c1 \u0679\u0648\u0644 \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a \u0644\u06cc\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0634\u06cc\u0679 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06c1\u06d2\u06d4 <strong>\u0641\u0631\u06cc\u0645<\/strong> \u06a9\u06d2 \u0633\u0627\u062a\u06be:<\/p>\n<ul>\n<li>\u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u0644\u06cc\u0628\u0644 \u06a9\u0631\u06cc\u06ba: <code>Shot 1<\/code> \u06cc\u0627 <code>Scene 1<\/code><\/li>\n<li>\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0639\u0646\u0648\u0627\u0646<\/li>\n<li>\u06a9\u06cc\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0633 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a<\/li>\n<li>\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0645\u062f\u062a (\u0633\u06cc\u06a9\u0646\u0688)<\/li>\n<\/ul>\n<p>\u0641\u0631\u06cc\u0645 \u0634\u06cc\u0679\u0633 \u067e\u0631 \u0686\u0627\u0631 \u062a\u0631\u062a\u06cc\u0628\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<ul>\n<li><strong>1 \u0641\u0631\u06cc\u0645 \u0641\u06cc \u0635\u0641\u062d\u06c1<\/strong>\u06c1\u0631 \u0634\u0627\u0679 \u06a9\u0648 \u0628\u0691\u06d2 \u0688\u0633\u067e\u0644\u06d2 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2<\/li>\n<li><strong>\u06af\u0631\u0688<\/strong>\u062a\u0627\u06a9\u06c1 \u0622\u067e \u067e\u0648\u0631\u06cc \u062a\u0631\u062a\u06cc\u0628 \u06a9\u0648 \u0627\u06cc\u06a9 \u0646\u0638\u0631 \u0645\u06cc\u06ba \u062f\u06cc\u06a9\u06be \u0633\u06a9\u06cc\u06ba<\/li>\n<li><strong>\u0646\u0648\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u06cc\u0646\u0644<\/strong>\u0633\u06cc\u0679 \u0645\u06cc\u06ba \u06c1\u0627\u062a\u06be \u0633\u06d2 \u0644\u06a9\u06be\u06d2 \u06af\u0626\u06d2 \u0646\u0648\u0679\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062d\u06a9\u0645\u0631\u0627\u0646\u06cc \u0648\u0627\u0644\u06cc \u0644\u0627\u0626\u0646\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba\u06d4<\/li>\n<li><strong>\u0641\u0644\u0645 \u06a9\u06cc \u067e\u0679\u06cc<\/strong>\u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633\u06a9 \u0646\u0638\u0631 \u06a9\u06d2 \u0644\u0626\u06d2 sprocket \u0633\u0648\u0631\u0627\u062e \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2<\/li>\n<\/ul>\n<p>\u06c1\u0631 \u0634\u06cc\u0679 \u06a9\u0627 \u0627\u06cc\u06a9 \u0639\u0646\u0648\u0627\u0646\u060c \u06a9\u0644 \u0631\u0646 \u0679\u0627\u0626\u0645\u060c \u0627\u0648\u0631 \u0627\u0648\u067e\u0631 \u0627\u06cc\u06a9 \u0634\u06cc\u0679 \u0646\u0645\u0628\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0634\u0631\u0648\u0639 \u0633\u06d2 \u0627\u062e\u062a\u062a\u0627\u0645 \u062a\u06a9 \u0628\u06c1\u0627\u0624 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">Images \u2192 frames (title, description, duration)\n       \u2192 layout (where each box goes, in PDF points)\n       \u2192 canvas (labels, text, lines)\n       \u2192 PDF (photos as JPEG + one text layer per sheet)\n       \u2192 download\n<\/code><\/pre>\n<h3 id=\"heading-why-the-text-is-drawn-on-a-canvas\">\u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u0645\u062a\u0646 \u06a9\u06cc\u0648\u06ba \u06a9\u06be\u06cc\u0646\u0686\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u061f<\/h3>\n<p>PDF-lib \u0627\u0635\u0644 \u0645\u062a\u0646 \u06a9\u0648 PDF \u0645\u06cc\u06ba \u0644\u06a9\u06be \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0635\u0631\u0641 \u0627\u06cc\u0645\u0628\u06cc\u0688\u0688 \u0641\u0648\u0646\u0679 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2\u06d4 \u0645\u0639\u06cc\u0627\u0631\u06cc \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0641\u0648\u0646\u0679\u0633 \u0635\u0631\u0641 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0644\u0627\u0637\u06cc\u0646\u06cc \u062d\u0631\u0648\u0641 \u06a9\u0627 \u0627\u062d\u0627\u0637\u06c1 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u06c1\u0630\u0627 \u06c1\u0646\u062f\u06cc\u060c \u06af\u062c\u0631\u0627\u062a\u06cc\u060c \u0639\u0631\u0628\u06cc\u060c \u06cc\u0627 \u062c\u0627\u067e\u0627\u0646\u06cc \u0645\u06cc\u06ba \u0648\u0636\u0627\u062d\u062a\u06cc\u06ba \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4<\/p>\n<p>\u062f\u0648\u0633\u0631\u06cc \u0637\u0631\u0641\u060c \u06a9\u06cc\u0646\u0648\u0633\u060c \u0622\u0644\u06c1 \u067e\u0631 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0645\u0648\u062c\u0648\u062f \u0641\u0648\u0646\u0679\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0645\u062a\u0646 \u06a9\u0648 \u06a9\u06be\u06cc\u0646\u0686 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0622\u0644\u06c1 \u0688\u0633\u067e\u0644\u06d2 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06c1\u0630\u0627 \u06cc\u06c1 \u0679\u0648\u0644 300dpi \u067e\u0631 \u062a\u0645\u0627\u0645 \u0645\u062a\u0646 \u06a9\u0648 \u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u06a9\u06be\u06cc\u0646\u0686\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06cc\u0646\u0648\u0633 \u06a9\u0648 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u0628\u0637\u0648\u0631 \u062a\u0635\u0648\u06cc\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0646\u0641\u06cc \u067e\u06c1\u0644\u0648 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u0645\u062a\u0646 \u06a9\u0648 \u0645\u0646\u062a\u062e\u0628 \u06cc\u0627 \u062a\u0644\u0627\u0634 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u067e\u0631\u0646\u0679 \u0627\u0648\u0631 \u062f\u06cc\u06a9\u06be\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u06c1 \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u0648 \u062a\u0644\u0627\u0634 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u0645\u062a\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u062a\u0648\u060c \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641-\u0644\u0650\u0628 \u0645\u06cc\u06ba \u0641\u0648\u0646\u0679 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>fontkit<\/code> \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u062f\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-project-setup\">\u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h2>\n<p>\u0622\u067e \u06a9\u0648 \u0635\u0631\u0641 \u062a\u06cc\u0646 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2:<\/p>\n<pre><code class=\"language-text\">image-storyboard\/\n\u251c\u2500\u2500 index.html\n\u251c\u2500\u2500 style.css\n\u2514\u2500\u2500 script.js\n<\/code><\/pre>\n<p>\u06a9\u06be\u0644\u0627 <code>index.html<\/code> \u0645\u0642\u0627\u0645\u06cc \u0633\u0631\u0648\u0631 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 (\u0645\u062b\u0644\u0627\u064b VS \u06a9\u0648\u0688 \u06a9\u0627 \u0644\u0627\u0626\u06cc\u0648 \u0633\u0631\u0648\u0631 \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646) <code>file:\/\/<\/code> \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06d2 \u0635\u0641\u062d\u06c1 \u067e\u0631 IndexedDB \u0627\u0648\u0631 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688\u0632 \u0622\u067e \u06a9\u06cc \u0627\u0635\u0644 \u0633\u0627\u0626\u0679 \u06a9\u06cc \u0637\u0631\u062d \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-libraries-and-browser-apis-used\">\u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc\u0627\u06ba \u0627\u0648\u0631 \u0628\u0631\u0627\u0624\u0632\u0631 APIs \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u06af\u06cc\u0627\u06d4<\/h2>\n<p>\u06cc\u06c1 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0627\u06cc\u06a9 \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc \u0627\u0648\u0631 \u06a9\u0626\u06cc \u0628\u0644\u0679 \u0627\u0646 \u0628\u0631\u0627\u0624\u0632\u0631 APIs \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<ul>\n<li><strong>PDF-lib<\/strong> \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0628\u0646\u0627\u0626\u06cc\u06ba\u060c \u062c\u06d2 \u067e\u06cc \u0627\u06cc \u062c\u06cc \u0627\u0648\u0631 \u067e\u06cc \u0627\u06cc\u0646 \u062c\u06cc \u0627\u0645\u06cc\u062c\u0632 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u06cc\u06ba\u06d4<\/li>\n<li><strong>\u06a9\u06cc\u0646\u0648\u0633 API<\/strong> \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0645\u062a\u0646 \u06a9\u06cc \u062a\u06c1\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0634\u06cc\u0679\u0633 \u0688\u0631\u0627 \u06a9\u0631\u06cc\u06ba\u06d4<\/li>\n<li><code>createImageBitmap<\/code>    \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0688\u06cc \u06a9\u0648\u0688 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0645\u062d\u0641\u0648\u0638 \u0634\u062f\u06c1 \u06af\u0631\u062f\u0634 \u06a9\u0648 \u0627\u067e\u0646\u06d2 \u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u067e\u0631 \u0644\u06af\u0627\u0626\u06cc\u06ba\u06d4<\/li>\n<li><strong>\u0627\u0646\u0688\u06cc\u06a9\u0633\u0688 \u0688\u06cc \u0628\u06cc<\/strong> \u0688\u0631\u0627\u0641\u0679 \u06a9\u0648 \u0627\u067e\u0646\u06d2 \u0628\u0631\u0627\u0624\u0632\u0631 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc\u06ba \u062a\u0627\u06a9\u06c1 \u0622\u067e \u06a9\u0627 \u06a9\u0627\u0645 \u0635\u0641\u062d\u06c1 \u06a9\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0644\u0648\u0688 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06c1\u06d2\u06d4<\/li>\n<\/ul>\n<p>PDF.js \u06a9\u06cc \u06cc\u06c1\u0627\u06ba \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u067e\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0648\u0626\u06cc PDF \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0633\u0628 \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0633\u06d2 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0622\u062e\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u0642\u0631\u0631\u06c1 \u0648\u0631\u0698\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be PDF-lib \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>body<\/code>\u0622\u067e \u06a9\u06d2 \u0627\u0633\u06a9\u0631\u067e\u0679 \u0633\u06d2 \u067e\u06c1\u0644\u06d2:<\/p>\n<pre><code class=\"language-html\"><script src=\"https:\/\/unpkg.com\/pdf-lib@1.17.1\/dist\/pdf-lib.min.js\"\/>\n<script src=\"script.js\"\/>\n<\/code><\/pre>\n<p>\u0648\u0631\u0698\u0646 \u06a9\u0648 \u067e\u0646 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc \u06a9\u06cc \u0645\u0633\u062a\u0642\u0628\u0644 \u06a9\u06cc \u0631\u06cc\u0644\u06cc\u0632 \u0622\u067e \u06a9\u06d2 \u0639\u0644\u0645 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0679\u0648\u0644 \u06a9\u0648 \u0646\u06c1\u06cc\u06ba \u062a\u0648\u0691 \u0633\u06a9\u062a\u06cc\u06d4<\/p>\n<h2 id=\"heading-creating-the-html-layout\">\u0627\u06cc\u06a9 HTML \u0644\u06d2 \u0622\u0624\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h2>\n<p>\u0635\u0641\u062d\u06c1 \u0686\u0627\u0631 \u062d\u0635\u0648\u06ba \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<ol>\n<li>\u0641\u0627\u0626\u0644 \u0627\u0646 \u067e\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u0631\u06cc\u0627 \u0627\u067e \u0644\u0648\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/li>\n<li>\u0645\u06cc\u06ba \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062f\u06c1 \u0645\u0633\u0648\u062f\u0648\u06ba \u06a9\u0648 \u0628\u062d\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0645\u0634\u0648\u0631\u06c1 \u062f\u06cc\u062a\u0627 \u06c1\u0648\u06ba\u06d4<\/li>\n<li>\u0641\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0627\u06cc\u06a9 \u06a9\u0627\u0631\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0641\u0631\u06cc\u0645 \u067e\u06cc\u0646\u0644<\/li>\n<li>\u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u06a9\u0627 \u067e\u06cc\u0646\u0644 \u0627\u0648\u0631 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u067e\u06cc\u0646\u0644<\/li>\n<\/ol>\n<p>\u0627\u067e \u0644\u0648\u0688 \u0627\u06cc\u0631\u06cc\u0627 \u0627\u0648\u0631 \u0688\u0631\u0627\u0641\u0679 \u0628\u0627\u0631 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-html\"><!-- 1. Upload -->\n<section id=\"uploadArea\" class=\"upload-area\">\n  <p>Drop images here or<\/p>\n  <button type=\"button\" id=\"selectBtn\">Select images<\/button>\n  <input type=\"file\" id=\"fileInput\" accept=\"image\/jpeg,image\/png,image\/webp,image\/gif\" multiple=\"multiple\" hidden=\"\"\/>\n  \n<\/section>\n\n<p>\n  <span id=\"draftText\"\/>\n  <button type=\"button\" id=\"restoreBtn\">Restore<\/button>\n  <button type=\"button\" id=\"discardBtn\">Discard<\/button>\n<\/p>\n<\/code><\/pre>\n<p>\u0641\u0627\u0626\u0644 \u0627\u0646 \u067e\u0679 \u0635\u0631\u0641 \u0641\u0627\u0631\u0645\u06cc\u0679\u0633 \u06a9\u0648 \u0642\u0628\u0648\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u062a\u0645\u0627\u0645 \u0628\u0631\u0627\u0624\u0632\u0631 \u0688\u06cc \u06a9\u0648\u0688 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba (JPEG\u060c PNG\u060c WebP\u060c \u0627\u0648\u0631 GIF)\u06d4<\/p>\n<p>\u0648\u0631\u06a9 \u0627\u0633\u067e\u06cc\u0633 \u0645\u06cc\u06ba \u062a\u06cc\u0646 \u067e\u06cc\u0646\u0644 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-html\"><!-- 2. Workspace -->\n<section id=\"workspace\" class=\"workspace\" hidden=\"\">\n  \n<\/section><\/code><\/pre>\n<p>\u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u06a9\u06d2 \u067e\u06cc\u0646\u0644 \u0645\u06cc\u06ba \u062f\u0631\u062c \u0630\u06cc\u0644 \u0641\u06c1\u0631\u0633\u062a \u0634\u0627\u0645\u0644 \u06c1\u06d2: <code>select<\/code> \u0627\u0648\u0631 <code>number<\/code> \u0627\u0646 \u067e\u0679 \u06c1\u0631 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 <code>id<\/code> \u06cc\u06c1 \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u06a9\u0644\u06cc\u062f \u0633\u06d2 \u0645\u06cc\u0644 \u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0622\u067e JavaScript \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0646\u0627\u0626\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<pre><code class=\"language-html\"><p>\n  <h2>Board settings<\/h2>\n  <label>Layout\n    <select id=\"layout\">\n      <option value=\"page\">One frame per page<\/option>\n      <option value=\"grid\" selected=\"selected\">Grid<\/option>\n      <option value=\"notes\">Panels with notes<\/option>\n      <option value=\"strip\">Film strip<\/option>\n    <\/select>\n  <\/label>\n  <label>Columns <input type=\"number\" id=\"cols\" min=\"1\" max=\"6\" value=\"3\"\/><\/label>\n  <label>Rows <input type=\"number\" id=\"rows\" min=\"1\" max=\"6\" value=\"2\"\/><\/label>\n  <!-- Paper, Orientation, Frame label, Font, Text size and\n       Description lines follow the same pattern -->\n<\/p>\n<\/code><\/pre>\n<p>\u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u067e\u06cc\u0646\u0644 \u06a9\u06cc\u0646\u0648\u0633\u060c \u0634\u06cc\u0679 \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0634\u0646\u060c \u0627\u0648\u0631 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0646\u0679\u0631\u0648\u0644\u0632 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-html\">\n<\/code><\/pre>\n<p>\u0645\u06cc\u06ba <code>style.css<\/code>\u0627\u06cc\u06a9 \u0627\u0635\u0648\u0644 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0633\u06d2 \u0628\u06be\u0648\u0644\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-css\">[hidden] { display: none !important; }\n<\/code><\/pre>\n<p>\u06a9\u0627\u0645 \u06a9\u06cc \u062c\u06af\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc \u06af\u0626\u06cc\u06d4 <code>display: grid<\/code> \u0688\u0631\u0627\u0641\u0679 \u0628\u0627\u0631 <code>display: flex<\/code>. \u06cc\u06c1 \u0627\u0635\u0648\u0644 \u0628\u0631\u0627\u0624\u0632\u0631 \u06a9\u06d2 \u0688\u06cc\u0641\u0627\u0644\u0679 \u0627\u0633\u0679\u0627\u0626\u0644 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u062e\u0635\u0648\u0635 \u06c1\u06cc\u06ba\u06d4 <code>hidden<\/code> \u06cc\u06c1 \u0627\u06cc\u06a9 \u067e\u0631\u0627\u067e\u0631\u0679\u06cc \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0627\u0633 \u0644\u0627\u0626\u0646 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u067e\u0648\u0634\u06cc\u062f\u06c1 \u0639\u0646\u0635\u0631 \u0627\u0628 \u0628\u06be\u06cc \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<h3 id=\"heading-selecting-the-main-elements\">\u06a9\u0644\u06cc\u062f\u06cc \u0639\u0646\u0627\u0635\u0631 \u06a9\u0648 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0633\u0628 \u0633\u06d2 \u0627\u0648\u067e\u0631 <code>script.js<\/code>\u0645\u0633\u062a\u0642\u0644\u060c \u0631\u06cc\u0627\u0633\u062a\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0639\u0646\u0635\u0631 \u06a9\u06d2 \u062d\u0648\u0627\u0644\u06c1 \u062c\u0627\u062a \u0633\u06cc\u0679 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Constants ----------\nconst PAPERS = {\n  a4: [595.28, 841.89],\n  letter: [612, 792],\n  a3: [841.89, 1190.55],\n  slide: [405, 720],\n};\nconst FONTS = {\n  sans: \"Arial, Helvetica, 'Noto Sans', sans-serif\",\n  serif: \"Georgia, 'Times New Roman', 'Noto Serif', serif\",\n  mono: \"'Courier New', Courier, monospace\",\n};\nconst THUMB_SIZE = 1000;\nconst ACCEPTED = ['image\/jpeg', 'image\/png', 'image\/webp', 'image\/gif'];\n\n\/\/ ---------- State ----------\nconst state = {\n  frames: [],\n  title: '',\n  sheet: 0,\n  nextId: 1,\n  lastDeleted: null,\n  opts: {\n    layout: 'grid', cols: 3, rows: 2, paper: 'a4', orient: 'landscape',\n    label: 'shot', font: 'sans', textSize: 'm', lines: 3,\n  },\n};\n\n\/\/ ---------- Elements ----------\nconst $ = (id) => document.getElementById(id);\nconst els = {\n  uploadArea: $('uploadArea'), fileInput: $('fileInput'), selectBtn: $('selectBtn'),\n  statusText: $('statusText'), workspace: $('workspace'), frameList: $('frameList'),\n  totalTime: $('totalTime'), boardTitle: $('boardTitle'), undoBtn: $('undoBtn'),\n  addMoreBtn: $('addMoreBtn'), canvas: $('previewCanvas'), prevBtn: $('prevBtn'),\n  nextBtn: $('nextBtn'), sheetInfo: $('sheetInfo'), fileName: $('fileName'),\n  quality: $('quality'), downloadBtn: $('downloadBtn'), resetBtn: $('resetBtn'),\n  resultText: $('resultText'), draftBar: $('draftBar'), draftText: $('draftText'),\n  restoreBtn: $('restoreBtn'), discardBtn: $('discardBtn'),\n};\nconst SETTING_IDS = ['layout', 'cols', 'rows', 'paper', 'orient', 'label', 'font', 'textSize', 'lines'];\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>state<\/code> \u0627\u06cc\u06a9 \u0686\u06cc\u0632 \u0633\u0686\u0627\u0626\u06cc \u06a9\u0627 \u0648\u0627\u062d\u062f \u0630\u0631\u06cc\u0639\u06c1 \u06c1\u06d2\u06d4 \u0641\u0631\u06cc\u0645 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a\u06cc\u06ba\u060c \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1\u060c \u0627\u0648\u0631 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0633\u0628\u06be\u06cc \u06cc\u06c1\u0627\u06ba \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u06c1\u0645 \u0622\u06c1\u0646\u06af\u06cc \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06a9\u0627\u063a\u0630 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u06cc\u06ba: <strong>\u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u0648\u0627\u0626\u0646\u0679\u0633<\/strong>. 1 \u067e\u0648\u0627\u0626\u0646\u0679 1\/72 \u0627\u0646\u0686 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 A4 \u0635\u0641\u062d\u06c1 595.28 \u00d7 841.89 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u06cc \u0631\u06cc\u0627\u0636\u06cc \u067e\u0648\u0627\u0626\u0646\u0679 \u0628\u06c1 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u062c\u0628 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u0635\u0631\u0641 \u067e\u06a9\u0633\u0644\u0632 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-adding-and-loading-images\">\u062a\u0635\u0627\u0648\u06cc\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0644\u0648\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<h3 id=\"heading-opening-files-from-the-button-or-by-dropping-them\">\u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u0628\u0679\u0646 \u06cc\u0627 \u0688\u0631\u0627\u067e \u0633\u06d2 \u06a9\u06be\u0648\u0644\u06cc\u06ba\u06d4<\/h3>\n<p>\"\u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u06cc\u06ba\" \u0628\u0679\u0646 \u0627\u06cc\u06a9 \u067e\u0648\u0634\u06cc\u062f\u06c1 \u0641\u0627\u0626\u0644 \u0627\u0646 \u067e\u0679 \u06a9\u0648 \u06a9\u06be\u0648\u0644\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0635\u0641\u062d\u06c1 \u067e\u0631 \u06a9\u06c1\u06cc\u06ba \u0628\u06be\u06cc \u0641\u0627\u0626\u0644 \u0686\u06be\u0648\u0691\u0646\u06d2 \u0633\u06d2 \u06cc\u06c1 \u0628\u06be\u06cc \u0634\u0627\u0645\u0644 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Upload area ----------\nels.selectBtn.addEventListener('click', () => els.fileInput.click());\nels.addMoreBtn.addEventListener('click', () => els.fileInput.click());\nels.fileInput.addEventListener('change', () => {\n  addFiles(els.fileInput.files);\n  els.fileInput.value=\"\";\n});\n\n['dragenter', 'dragover'].forEach((type) => {\n  document.addEventListener(type, (e) => {\n    if (!e.dataTransfer.types.includes('Files')) return;\n    e.preventDefault();\n    els.uploadArea.classList.add('dragover');\n  });\n});\n['dragleave', 'drop'].forEach((type) => {\n  document.addEventListener(type, () => els.uploadArea.classList.remove('dragover'));\n});\ndocument.addEventListener('drop', (e) => {\n  if (!e.dataTransfer.files.length) return;\n  e.preventDefault();\n  addFiles(e.dataTransfer.files);\n});\n\nfunction showWorkspace() {\n  els.uploadArea.hidden = true;\n  els.draftBar.hidden = true;\n  els.workspace.hidden = false;\n}\n<\/code><\/pre>\n<p>\u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u0627 <code>fileInput.value<\/code> \u06c1\u0631 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0635\u0627\u0631\u0641 \u0627\u0633\u06cc \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0628\u0639\u062f \u0645\u06cc\u06ba \u062f\u0648\u0628\u0627\u0631\u06c1 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u06c1 <code>dataTransfer.types.includes('Files')<\/code> \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0626\u06cc\u06ba \u06a9\u06c1 \u0688\u0631\u0627\u067e \u06c1\u0627\u0626\u06cc \u0644\u0627\u0626\u0679 \u0635\u0631\u0641 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u0646\u06c1 \u06a9\u06c1 \u0627\u0646 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba \u06af\u06be\u0633\u06cc\u0679\u06d2 \u062c\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-fixing-phone-photo-rotation\">\u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06cc \u06af\u0631\u062f\u0634 \u06a9\u0648 \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u062c\u0628 \u0622\u067e \u0641\u0648\u0646 \u06a9\u0648 \u0627\u06cc\u06a9 \u0637\u0631\u0641 \u0631\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 Pixel \u0646\u06c1\u06cc\u06ba \u06af\u06be\u0648\u0645\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0633\u06cc\u0646\u0633\u0631 \u0627\u0648\u0631\u06cc\u0646\u0679\u06cc\u0634\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06cc\u06a9 EXIF \u200b\u200b\u0679\u06cc\u06af \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u06a9\u06c1\u062a\u0627 \u06c1\u06d2 \"\u0688\u0633\u067e\u0644\u06d2 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a 90\u00b0 \u06af\u06be\u0645\u0627\u0626\u06cc\u06ba\"\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u0627\u0633 \u0637\u0631\u062d \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06be\u06cc\u0646\u0686\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>img<\/code> \u06a9\u0686\u06be \u0628\u0631\u0627\u0624\u0632\u0631\u0632 \u0645\u06cc\u06ba\u060c \u0627\u06af\u0631 \u0622\u067e \u06a9\u0633\u06cc \u0639\u0646\u0635\u0631 \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u06af\u0631\u062f\u0634 \u06a9\u06d2 \u0644\u0627\u06af\u0648 \u06c1\u0648\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0686\u0648\u0691\u0627\u0626\u06cc \u0627\u0648\u0631 \u0627\u0648\u0646\u0686\u0627\u0626\u06cc \u06a9\u0648 \u067e\u0691\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0641\u0631\u06cc\u0645 \u0627\u06cc\u06a9 \u0637\u0631\u0641 \u06cc\u0627 \u063a\u0644\u0637 \u0634\u06a9\u0644 \u0645\u06cc\u06ba \u0646\u0638\u0631 \u0622\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p><code>createImageBitmap<\/code>    \u06a9\u06d2 \u0633\u0627\u062a\u06be <code>imageOrientation: 'from-image'<\/code> \u0688\u06cc \u06a9\u0648\u0688\u0646\u06af \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0628\u0631\u0627\u0624\u0632\u0631 \u0633\u06d2 EXIF \u200b\u200b\u0631\u0648\u0679\u06cc\u0634\u0646 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u0648 \u06a9\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Loading images ----------\n\/\/ Phone photos store their rotation in EXIF. imageOrientation: 'from-image'\n\/\/ asks the browser to apply it, so the picture comes out the right way up.\nfunction decodeImage(blob) {\n  if ('createImageBitmap' in window) {\n    return createImageBitmap(blob, { imageOrientation: 'from-image' })\n      .catch(() => loadWithImgTag(blob));\n  }\n  return loadWithImgTag(blob);\n}\n\nfunction loadWithImgTag(blob) {\n  return new Promise((resolve, reject) => {\n    const url = URL.createObjectURL(blob);\n    const img = new Image();\n    img.onload = () => { URL.revokeObjectURL(url); resolve(img); };\n    img.onerror = () => { URL.revokeObjectURL(url); reject(new Error('decode')); };\n    img.src = url;\n  });\n}\n\nfunction canvasToBlob(canvas, type, quality) {\n  return new Promise((resolve, reject) => {\n    canvas.toBlob((b) => (b ? resolve(b) : reject(new Error('encode'))), type, quality);\n  });\n}\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 <code>createImageBitmap<\/code> \u0627\u06af\u0631 \u06cc\u06c1 \u062f\u0633\u062a\u06cc\u0627\u0628 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06cc\u0627 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06a9\u0648\u0688 \u0645\u0639\u0645\u0648\u0644 \u067e\u0631 \u0622\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>img<\/code> \u0639\u0646\u0635\u0631 \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u0624\u0632\u0631 EXIF \u200b\u200b\u06af\u0631\u062f\u0634 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>img<\/code> \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631\u060c \u0648\u06c1\u06cc \u0639\u0646\u0627\u0635\u0631 \u06a9\u06d2 \u0644\u0626\u06d2 \u062c\u0627\u062a\u0627 \u06c1\u06d2.<\/p>\n<p><code>canvasToBlob<\/code>    \u06a9\u0627\u0644 \u0628\u06cc\u06a9 \u0628\u06cc\u0633 \u06a9\u0648 \u0644\u067e\u06cc\u0679\u062a\u0627 \u06c1\u06d2\u06d4 <code>canvas.toBlob()<\/code> \u0622\u067e \u0627\u0633\u06d2 \u0648\u0639\u062f\u06d2 \u0645\u06cc\u06ba \u0627\u0633 \u0637\u0631\u062d \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba: <code>await<\/code>.<\/p>\n<h3 id=\"heading-making-a-frame-object-with-a-thumbnail\">\u062a\u06be\u0645\u0628 \u0646\u06cc\u0644\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h3>\n<p>\u0633\u06cc\u0644 \u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 4000 \u00d7 3000 \u067e\u06a9\u0633\u0644\u0632 \u0633\u06d2 \u0628\u0691\u06cc \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06c1\u0631 \u0628\u0627\u0631 \u062c\u0628 \u0635\u0627\u0631\u0641 \u0627\u0646 \u06a9\u0648 \u0679\u0627\u0626\u067e \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062a\u0648 \u062f\u0631\u062c\u0646\u0648\u06ba \u062d\u0631\u0648\u0641 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0633\u0633\u062a \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06c1\u0630\u0627\u060c \u06c1\u0631 \u0641\u0631\u06cc\u0645 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0635\u0644 \u0641\u0627\u0626\u0644 \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u06cc JPEG \u06a9\u0627\u067e\u06cc (\u0633\u0628 \u0633\u06d2 \u0644\u0645\u0628\u06cc \u0633\u0627\u0626\u06cc\u0688 \u067e\u0631 1000 \u067e\u06a9\u0633\u0644\u0632 \u062a\u06a9) \u0641\u0631\u06cc\u0645 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a\u0648\u06ba \u0627\u0648\u0631 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">async function makeFrame(file) {\n  const pic = await decodeImage(file);\n  const w = pic.naturalWidth || pic.width;\n  const h = pic.naturalHeight || pic.height;\n\n  \/\/ A small copy for the frame list and the preview\n  const scale = Math.min(1, THUMB_SIZE \/ Math.max(w, h));\n  const c = document.createElement('canvas');\n  c.width = Math.round(w * scale);\n  c.height = Math.round(h * scale);\n  const ctx = c.getContext('2d');\n  ctx.fillStyle=\"#ffffff\";\n  ctx.fillRect(0, 0, c.width, c.height);\n  ctx.drawImage(pic, 0, 0, c.width, c.height);\n  if (pic.close) pic.close();\n\n  const thumb = await canvasToBlob(c, 'image\/jpeg', 0.86);\n  return {\n    id: 'f' + state.nextId++,\n    blob: file, name: file.name, w, h,\n    thumb, thumbUrl: URL.createObjectURL(thumb), thumbPic: null,\n    title: '', desc: '', dur: '',\n  };\n}\n<\/code><\/pre>\n<p>\u062a\u0648\u062c\u06c1 \u0641\u0631\u0645\u0627\u0626\u06cc\u06ba <code>w<\/code> \u0627\u0648\u0631 <code>h<\/code> \u0648\u06c1 \u0636\u0627\u0628\u0637\u06c1 \u06a9\u0634\u0627\u0626\u06cc \u06a9\u06d2 \u0628\u0639\u062f \u067e\u0691\u06be\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u06c1\u0630\u0627 \u0648\u06c1 \u0627\u06cc\u06a9 \u06c1\u06cc \u0633\u0627\u0626\u0632 \u06a9\u06d2 \u06c1\u06cc\u06ba\u06d4 <strong>~ \u0628\u0639\u062f<\/strong> \u06af\u0631\u062f\u0634 \u0622\u067e \u06a9\u06d2 \u0641\u0648\u0646 \u06a9\u06d2 \u067e\u0648\u0631\u0679\u0631\u06cc\u0679 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u067e\u0648\u0631\u0679\u0631\u06cc\u0679 \u0641\u0631\u06cc\u0645 \u0634\u0627\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0634\u0641\u0627\u0641\u06cc\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be PNG \u0627\u0645\u06cc\u062c\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u0631\u0627\u0626\u0646\u06af \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0633\u0641\u06cc\u062f \u0628\u06be\u0631\u0646\u0627 \u0627\u06c1\u0645 \u06c1\u06d2\u06d4 \u062c\u06d2 \u067e\u06cc \u0627\u06cc \u062c\u06cc \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u0634\u0641\u0627\u0641\u06cc\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0634\u0641\u0627\u0641 \u0639\u0644\u0627\u0642\u06d2 \u0628\u0635\u0648\u0631\u062a \u062f\u06cc\u06af\u0631 \u0633\u06cc\u0627\u06c1 \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<h3 id=\"heading-sorting-by-file-name\">\u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0646\u0627\u0645 \u0633\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u06ba\u06d4<\/h3>\n<p>\u0644\u0648\u06af\u0648\u06ba \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06cc \u0641\u0627\u0626\u0644\u06cc\u06ba\u06d4 <code>shot-1.jpg<\/code>, <code>shot-2.jpg<\/code> \u2026 <code>shot-10.jpg<\/code>. \u0627\u06cc\u06a9 \u0639\u0627\u0645 \u0633\u0679\u0631\u0646\u06af \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628 \u06c1\u06d2\u06d4 <code>shot-10<\/code> \u067e\u06c1\u0644\u06d2 <code>shot-2<\/code>\u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06a9\u0631\u062f\u0627\u0631\u0648\u06ba \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u0646\u0627 <code>1<\/code> \u06a9\u06d2 \u0633\u0627\u062a\u06be <code>2<\/code>.<\/p>\n<p><code>localeCompare<\/code>    \u06a9\u06d2 \u0633\u0627\u062a\u06be <code>numeric<\/code> \u0622\u067e\u0634\u0646 \u0646\u0627\u0645 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u0646\u0645\u0628\u0631\u0648\u06ba \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u0646\u0645\u0628\u0631\u0648\u06ba \u0633\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ \"shot-2.jpg\" before \"shot-10.jpg\"\nfunction naturalCompare(a, b) {\n  return a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' });\n}\n<\/code><\/pre>\n<h3 id=\"heading-adding-the-files\">\u0641\u0627\u0626\u0644 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p><code>addFiles<\/code>    \u06cc\u06c1 \u063a\u06cc\u0631 \u062a\u0639\u0627\u0648\u0646 \u06cc\u0627\u0641\u062a\u06c1 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u0641\u0644\u0679\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0628\u0627\u0642\u06cc \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u060c \u06c1\u0631 \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u0686\u06be\u0648\u0691\u06cc \u06c1\u0648\u0626\u06cc \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06cc \u0631\u067e\u0648\u0631\u0679 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">async function addFiles(fileList) {\n  const files = Array.from(fileList);\n  const images = files.filter((f) => ACCEPTED.includes(f.type))\n    .sort((a, b) => naturalCompare(a.name, b.name));\n  const skipped = files.length - images.length;\n  let failed = 0;\n\n  for (let i = 0; i < images.length; i++) {\n    els.statusText.textContent = `Reading image ${i + 1} of ${images.length}...`;\n    try {\n      state.frames.push(await makeFrame(images[i]));\n    } catch (err) {\n      failed++;\n    }\n  }\n\n  const notes = [];\n  if (skipped) notes.push(`${skipped} file(s) skipped: not JPG, PNG, WebP or GIF`);\n  if (failed) notes.push(`${failed} image(s) couldn't be read`);\n  els.statusText.textContent = notes.join('. ');\n\n  if (state.frames.length) {\n    showWorkspace();\n    renderFrameList();\n    drawPreview();\n    saveDraftSoon();\n  }\n}\n<\/code><\/pre>\n<p>\u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0648\u0642\u062a \u0645\u06cc\u06ba \u067e\u0691\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0646\u06c1 \u06a9\u06c1 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be\u06d4 <code>Promise.all<\/code>. \u0645\u062a\u0648\u0627\u0632\u06cc \u0637\u0648\u0631 \u067e\u0631 50 \u0628\u0691\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u0688\u06cc \u06a9\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u06d2 \u0641\u0648\u0646 \u06a9\u06cc \u0645\u06cc\u0645\u0648\u0631\u06cc \u062e\u062a\u0645 \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u060c \u062c\u0628\u06a9\u06c1 \u0627\u0646\u06c1\u06cc\u06ba \u062a\u0631\u062a\u06cc\u0628 \u0633\u06d2 \u067e\u0691\u06be\u0646\u0627 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633\u0679\u06cc\u0679\u0633 \u067e\u06cc\u063a\u0627\u0645\u0627\u062a \u062f\u0631\u0633\u062a \u0631\u06c1\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621348_953_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u062a\u0635\u0648\u06cc\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u0648\u0631\u06a9 \u0627\u0633\u067e\u06cc\u0633: \u0628\u0627\u0626\u06cc\u06ba \u0637\u0631\u0641 \u0641\u0631\u06cc\u0645 \u06a9\u0627\u0631\u0688\u060c \u062f\u0631\u0645\u06cc\u0627\u0646 \u0645\u06cc\u06ba \u0633\u06cc\u0679\u0646\u06af\u0632\u060c \u0627\u0648\u0631 \u062f\u0627\u0626\u06cc\u06ba \u062c\u0627\u0646\u0628 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h2 id=\"heading-managing-the-frames\">\u0641\u0631\u06cc\u0645 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679<\/h2>\n<h3 id=\"heading-the-frame-card\">\u0641\u0631\u06cc\u0645 \u06a9\u0627\u0631\u0688<\/h3>\n<p>\u06c1\u0631 \u0641\u0631\u06cc\u0645 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06a9\u0627\u0631\u0688 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0633 \u0645\u06cc\u06ba \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644\u060c \u0679\u0627\u0626\u0679\u0644 \u0641\u06cc\u0644\u0688\u060c \u0688\u0633\u06a9\u0631\u067e\u0634\u0646 \u0628\u0627\u06a9\u0633\u060c \u062f\u0648\u0631\u0627\u0646\u06cc\u06c1 \u0641\u06cc\u0644\u0688 \u0627\u0648\u0631 \u062a\u06cc\u0646 \u0628\u0679\u0646 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Frame list ----------\nfunction escapeHtml(s) {\n  const map = { '&': '&', '<': '<', '>': '>', '\"': '\"', \"'\": ''' };\n  return String(s).replace(\/[&<>\"']\/g, (c) => map[c]);\n}\n\nfunction renderFrameList() {\n  els.frameList.innerHTML = state.frames.map((f, i) => `\n    <li class=\"frame-card\" data-id=\"${f.id}\">\n      <img decoding=\"async\" src=\"https:\/\/www.freecodecamp.org\/news\/build-image-storyboard-to-pdf-tool-javascript\/${f.thumbUrl}\" alt=\"\" draggable=\"true\" title=\"\">\n      \n    <\/li>`).join('');\n  updateTotal();\n}\n\nfunction updateTotal() {\n  const total = totalDuration();\n  els.totalTime.textContent = `${state.frames.length} frames` + (total ? `, ${formatDuration(total)}` : '');\n}\n\nfunction findFrame(el) {\n  const li = el.closest('[data-id]');\n  return li ? state.frames.findIndex((f) => f.id === li.dataset.id) : -1;\n}\n<\/code><\/pre>\n<p>\u0686\u0648\u0646\u06a9\u06c1 \u0639\u0646\u0648\u0627\u0646 \u0627\u0648\u0631 \u062a\u0641\u0635\u06cc\u0644 \u0635\u0627\u0631\u0641 \u06a9\u06cc \u0637\u0631\u0641 \u0633\u06d2 \u0622\u062a\u06cc \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0648\u06c1 HTML \u0645\u06cc\u06ba \u062f\u0627\u062e\u0644 \u06c1\u0648\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0628\u0686 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0628\u063a\u06cc\u0631 <code>escapeHtml<\/code>\u0639\u0646\u0648\u0627\u0646\u0627\u062a \u062c\u06cc\u0633\u06d2 <code>Shot \"A\"<\/code> \u0679\u0648\u0679 \u062c\u0627\u0626\u06d2 \u06af\u0627 <code>value<\/code> \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-updating-the-state-while-typing\">\u0679\u0627\u0626\u067e \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0627\u067e\u0646\u06cc \u062d\u06cc\u062b\u06cc\u062a \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0627\u06af\u0631 \u0622\u067e \u06c1\u0631 \u0628\u0627\u0631 \u0627\u06cc\u06a9 \u06a9\u0644\u06cc\u062f \u062f\u0628\u0627\u0646\u06d2 \u067e\u0631 \u067e\u0648\u0631\u06cc \u0641\u06c1\u0631\u0633\u062a \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06c1\u0631 \u062d\u0631\u0641 \u06a9\u06d2 \u0628\u0639\u062f \u0679\u06cc\u06a9\u0633\u0679 \u0641\u06cc\u0644\u0688 \u06a9\u06cc \u062a\u0648\u062c\u06c1 \u062e\u062a\u0645 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u06cc\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u06cc\u06a9 <code>input<\/code> \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba \u0633\u0646\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0635\u0631\u0641 \u062d\u0627\u0644\u062a \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">els.frameList.addEventListener('input', (e) => {\n  const i = findFrame(e.target);\n  const field = e.target.dataset.field;\n  if (i < 0 || !field) return;\n  state.frames[i][field] = e.target.value;\n  updateTotal();\n  drawPreviewSoon();\n  saveDraftSoon();\n});\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <strong>\u062a\u0642\u0631\u06cc\u0628 \u06a9\u0627 \u0648\u0641\u062f<\/strong>: \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0633\u0646\u0646\u06d2 \u0648\u0627\u0644\u0627 \u062a\u0645\u0627\u0645 \u06a9\u0627\u0631\u0688\u0632 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0634\u0639\u0628\u0648\u06ba \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0628\u0634\u0645\u0648\u0644 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u0631\u062f\u06c1 \u06a9\u0627\u0631\u0688\u0632\u06d4 \u06a9\u06c1 <code>data-field<\/code> \u067e\u0631\u0627\u067e\u0631\u0679\u06cc \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0648\u0646\u0633\u06cc \u067e\u0631\u0627\u067e\u0631\u0679\u06cc \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0631\u06cc \u0688\u0631\u0627 \u0645\u06cc\u06ba \u0627\u0633 \u0637\u0631\u062d \u062a\u0627\u062e\u06cc\u0631 \u06c1\u0648\u0626\u06cc \u06c1\u06d2: <code>drawPreviewSoon()<\/code>\u0686\u0648\u0646\u06a9\u06c1 \u0622\u067e \u0627\u0633\u06d2 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0644\u06a9\u06be\u06cc\u06ba \u06af\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0686\u0644\u06d2 \u06af\u0627 \u062c\u0628 \u0635\u0627\u0631\u0641 \u0679\u0627\u0626\u067e\u0646\u06af \u06a9\u0648 \u0631\u0648\u06a9\u06d2 \u06af\u0627 \u0628\u062c\u0627\u0626\u06d2 \u06a9\u06c1 \u0679\u0627\u0626\u067e \u06a9\u06cc\u06d2 \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06c1\u0631 \u062d\u0631\u0641 \u06a9\u06d2\u06d4<\/p>\n<h3 id=\"heading-durations-and-the-total-running-time\">\u0645\u062f\u062a \u0627\u0648\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u0627 \u06a9\u0644 \u0648\u0642\u062a<\/h3>\n<p>\u062f\u0648\u0631\u0627\u0646\u06cc\u06c1 \u0633\u06cc\u06a9\u0646\u0688\u0648\u06ba \u0645\u06cc\u06ba \u0645\u062d\u0641\u0648\u0638 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u0637\u0631\u062d \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2: <code>4.5 s<\/code> 1 \u0645\u0646\u0679 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u06cc\u0627 <code>1:10<\/code> 1 \u0645\u0646\u0679 \u0633\u06d2:<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Durations ----------\nfunction formatDuration(seconds) {\n  const s = Number(seconds) || 0;\n  if (s <= 0) return '';\n  if (s < 60) return `${Math.round(s * 10) \/ 10} s`;\n  const m = Math.floor(s \/ 60);\n  const r = Math.round(s - m * 60);\n  return `${m}:${String(r).padStart(2, '0')}`;\n}\n\nfunction totalDuration() {\n  return state.frames.reduce((sum, f) => sum + (Number(f.dur) || 0), 0);\n}\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621349_213_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u0639\u0646\u0648\u0627\u0646\u060c \u062a\u0641\u0635\u06cc\u0644 \u0627\u0648\u0631 \u0645\u062f\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0641\u0631\u06cc\u0645 \u06a9\u0627\u0631\u0688\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621349_579_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"8e63a168-7ccc-43bf-a791-55e88aed6e6a\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-reordering-frames\">\u0641\u0631\u06cc\u0645 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u0627<\/h3>\n<p>\u0627\u0648\u067e\u0631 \u0627\u0648\u0631 \u0646\u06cc\u0686\u06d2 \u06a9\u06d2 \u0628\u0679\u0646 \u0627\u0648\u0631 \u0688\u06cc\u0644\u06cc\u0679 \u0628\u0679\u0646 \u06a9\u0648 \u0633\u0646\u06af\u0644 \u06a9\u0644\u06a9 \u0633\u0646\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">els.frameList.addEventListener('click', (e) => {\n  const btn = e.target.closest('[data-act]');\n  if (!btn) return;\n  const i = findFrame(btn);\n  if (btn.dataset.act === 'up') moveFrame(i, i - 1);\n  if (btn.dataset.act === 'down') moveFrame(i, i + 1);\n  if (btn.dataset.act === 'delete') deleteFrame(i);\n});\n\nfunction moveFrame(from, to) {\n  if (to < 0 || to >= state.frames.length || from === to) return;\n  const [frame] = state.frames.splice(from, 1);\n  state.frames.splice(to, 0, frame);\n  renderFrameList();\n  drawPreview();\n  saveDraftSoon();\n}\n<\/code><\/pre>\n<p><code>splice(from, 1)<\/code>    \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u06c1\u0679\u0627 \u062f\u06cc\u06ba\u060c <code>splice(to, 0, frame)<\/code> \u0627\u0633\u06d2 \u0627\u0633 \u06a9\u06d2 \u0646\u0626\u06d2 \u0645\u0642\u0627\u0645 \u067e\u0631 \u0644\u0648\u0679\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u0627\u0624\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u06a9\u0648 \u062f\u0648\u0633\u0631\u06d2 \u06a9\u0627\u0631\u0688 \u067e\u0631 \u06af\u06be\u0633\u06cc\u0679\u0646\u0627 \u0627\u0633\u06d2 \u0627\u0633 \u06a9\u0627\u0631\u0688 \u0645\u06cc\u06ba \u0644\u06d2 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 HTML5 \u0688\u0631\u06cc\u06af \u0627\u06cc\u0646\u0688 \u0688\u0631\u0627\u067e API \u06a9\u06d2 \u062a\u0642\u0627\u0636\u06d2 <code>preventDefault()<\/code> \u06a9\u0648 <code>dragover<\/code>\u0628\u0635\u0648\u0631\u062a \u062f\u06cc\u06af\u0631 \u0622\u067e \u06a9\u0627 \u0628\u0631\u0627\u0624\u0632\u0631 \u0688\u0631\u0627\u067e \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u0646\u06c1\u06cc\u06ba \u062f\u06d2 \u06af\u0627:<\/p>\n<pre><code class=\"language-javascript\">\/\/ Drag a thumbnail onto another card to move it there\nlet dragIndex = -1;\nels.frameList.addEventListener('dragstart', (e) => {\n  dragIndex = findFrame(e.target);\n  e.dataTransfer.effectAllowed = 'move';\n  e.target.closest('li').classList.add('dragging');\n});\nels.frameList.addEventListener('dragover', (e) => {\n  if (dragIndex > -1) e.preventDefault();\n});\nels.frameList.addEventListener('drop', (e) => {\n  if (dragIndex < 0) return;\n  e.preventDefault();\n  e.stopPropagation();\n  const to = findFrame(e.target);\n  moveFrame(dragIndex, to < 0 ? state.frames.length - 1 : to);\n  dragIndex = -1;\n});\nels.frameList.addEventListener('dragend', () => {\n  dragIndex = -1;\n  els.frameList.querySelectorAll('.dragging').forEach((li) => li.classList.remove('dragging'));\n});\n<\/code><\/pre>\n<p><code>stopPropagation()<\/code>    \u067e\u0631 <code>drop<\/code> \u06c1\u06cc\u0646\u0688\u0644\u0631 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u06cc \u0633\u0637\u062d \u06a9\u06d2 \u0688\u0631\u0627\u067e \u06c1\u06cc\u0646\u0688\u0644\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0646\u0626\u06cc \u0641\u0627\u0626\u0644 \u0688\u0631\u0627\u067e \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633 \u0627\u0642\u062f\u0627\u0645 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0631\u0648\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0631\u06cc\u06af \u0627\u06cc\u0646\u0688 \u0688\u0631\u0627\u067e \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u06be\u06cc \u0627\u0648\u067e\u0631 \u0627\u0648\u0631 \u0646\u06cc\u0686\u06d2 \u06a9\u06d2 \u0628\u0679\u0646\u0648\u06ba \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u0688\u0631\u06cc\u06af \u0627\u06cc\u0646\u0688 \u0688\u0631\u0627\u067e \u06a9\u06cc \u0628\u0648\u0631\u0688\u0632 \u067e\u0631 \u06a9\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u0627\u0648\u0631 \u0679\u0686 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \u062a\u06a9\u0644\u06cc\u0641 \u062f\u06c1 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-deleting-a-frame-with-undo\">\u06a9\u0627\u0644\u0639\u062f\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u062d\u0630\u0641 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u063a\u0644\u0637\u06cc \u0633\u06d2 \u0644\u0645\u0628\u06cc \u062a\u0641\u0635\u06cc\u0644 \u0648\u0627\u0644\u06d2 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u0648 \u062d\u0630\u0641 \u06a9\u0631\u0646\u0627 \u0627\u06cc\u06a9 \u062a\u06a9\u0644\u06cc\u0641 \u062f\u06c1 \u06c1\u06d2\u06d4 \u0644\u06c1\u0630\u0627\u060c \u0679\u0648\u0644 \u0622\u062e\u0631\u06cc \u062d\u0630\u0641 \u0634\u062f\u06c1 \u0641\u0631\u06cc\u0645 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0645\u0642\u0627\u0645 \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">function deleteFrame(i) {\n  const [frame] = state.frames.splice(i, 1);\n  state.lastDeleted = { frame, index: i };\n  els.undoBtn.hidden = false;\n  renderFrameList();\n  drawPreview();\n  saveDraftSoon();\n}\n\nels.undoBtn.addEventListener('click', () => {\n  if (!state.lastDeleted) return;\n  const { frame, index } = state.lastDeleted;\n  state.frames.splice(Math.min(index, state.frames.length), 0, frame);\n  state.lastDeleted = null;\n  els.undoBtn.hidden = true;\n  renderFrameList();\n  drawPreview();\n  saveDraftSoon();\n});\n<\/code><\/pre>\n<p><code>Math.min(index, state.frames.length)<\/code>    \u0627\u0633 \u062f\u0648\u0631\u0627\u0646\u060c \u0627\u06af\u0631 \u0641\u06c1\u0631\u0633\u062a \u0645\u062e\u062a\u0635\u0631 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u0622\u062e\u0631 \u0645\u06cc\u06ba \u0648\u0627\u067e\u0633 \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-building-the-board-settings\">\u0628\u0644\u0688\u0646\u06af \u0628\u0648\u0631\u0688 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621349_819_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u062a\u0631\u062a\u06cc\u0628\u060c \u06a9\u0627\u0644\u0645\u060c \u0642\u0637\u0627\u0631\u060c \u06a9\u0627\u063a\u0630\u060c \u0648\u0627\u0642\u0641\u06cc\u062a\u060c \u0641\u0631\u06cc\u0645 \u0644\u06cc\u0628\u0644\u060c \u0641\u0648\u0646\u0679\u060c \u0627\u0648\u0631 \u0645\u062a\u0646 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0648\u0631\u0688 \u0633\u06cc\u0679\u0646\u06af \u067e\u06cc\u0646\u0644\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u062a\u0645\u0627\u0645 \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u067e\u0691\u06be\u06cc \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4 <code>state.opts<\/code> \u0627\u06cc\u06a9 \u062c\u06af\u06c1\u060c \u0639\u062f\u062f\u06cc \u0641\u06cc\u0644\u0688\u0632 \u0627\u06cc\u06a9 \u0645\u0639\u0642\u0648\u0644 \u062d\u062f \u062a\u06a9 \u0645\u062d\u062f\u0648\u062f \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Settings ----------\nfunction readSettings() {\n  const o = state.opts;\n  SETTING_IDS.forEach((id) => { o[id] = $(id).value; });\n  o.cols = Math.min(6, Math.max(1, parseInt(o.cols, 10) || 1));\n  o.rows = Math.min(6, Math.max(1, parseInt(o.rows, 10) || 1));\n  o.lines = Math.min(6, Math.max(1, parseInt(o.lines, 10) || 1));\n}\n\nSETTING_IDS.forEach((id) => {\n  $(id).addEventListener('change', () => {\n    readSettings();\n    state.sheet = 0;\n    drawPreview();\n  });\n});\n\nels.boardTitle.addEventListener('input', () => {\n  state.title = els.boardTitle.value.trim();\n  drawPreviewSoon();\n  saveDraftSoon();\n});\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 \u06a9\u0648\u0626\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc\u0627\u06ba \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u067e\u06c1\u0644\u06cc \u0634\u06cc\u0679 \u067e\u0631 \u0648\u0627\u067e\u0633 \u062c\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4 \u0628\u0648\u0631\u0688 \u06a9\u06d2 \u0639\u0646\u0648\u0627\u0646\u0627\u062a \u0628\u06be\u06cc \u0628\u0637\u0648\u0631 \u0645\u0633\u0648\u062f\u06c1 \u0645\u062d\u0641\u0648\u0638 \u06a9\u06cc\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0648\u06c1 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u06a9\u0627\u0645 \u06a9\u0627 \u062d\u0635\u06c1 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0686\u0627\u0631 \u062a\u0631\u062a\u06cc\u0628\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0635\u0631\u0641 \u062a\u0631\u062a\u06cc\u0628 \u0628\u062f\u0644\u062a\u06cc \u06c1\u06d2\u06d4 \u0641\u0631\u06cc\u0645 \u06a9\u0627 \u0688\u06cc\u0679\u0627 \u0648\u06c1\u06cc \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0635\u0627\u0631\u0641 \u0628\u063a\u06cc\u0631 \u06a9\u0633\u06cc \u0646\u0642\u0635\u0627\u0646 \u06a9\u06d2 \u0644\u06d2 \u0622\u0624\u0679 \u06a9\u0648 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-laying-out-a-storyboard-sheet\">\u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0634\u06cc\u0679 \u0644\u06d2 \u0622\u0624\u0679<\/h2>\n<p>\u06cc\u06c1 \u0622\u0644\u06d2 \u06a9\u0627 \u062f\u0644 \u06c1\u06d2. \u06a9\u0648\u0688 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u0688\u0631\u0627\u0626\u0646\u06af \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <strong>\u0633\u0627\u0631\u06d2 \u062e\u0627\u0646\u06d2 \u06a9\u06c1\u0627\u06ba \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u061f<\/strong>\u06cc\u06c1 \u0634\u06cc\u0679 \u06a9\u06d2 \u0627\u0648\u067e\u0631\u06cc \u0628\u0627\u0626\u06cc\u06ba \u06a9\u0648\u0646\u06d2 \u0645\u06cc\u06ba \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06d2 \u0622\u0624\u0679 \u06a9\u0648 \u0688\u0631\u0627\u0626\u0646\u06af \u0633\u06d2 \u0627\u0644\u06af \u0631\u06a9\u06be\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u0686\u06be\u0648\u0679\u06d2 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0627\u0648\u0631 300dpi PDF \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc \u062a\u0631\u062a\u06cc\u0628 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u0648\u06c1 \u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u0633\u06d2 \u0627\u0644\u06af \u0646\u06c1\u06cc\u06ba \u06c1\u0648 \u0633\u06a9\u062a\u06d2\u06d4<\/p>\n<h3 id=\"heading-calculating-the-sheet-size\">\u0634\u06cc\u0679 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u0627 \u062d\u0633\u0627\u0628 \u06a9\u062a\u0627\u0628<\/h3>\n<pre><code class=\"language-javascript\">\/\/ ---------- Layout: where everything goes, in PDF points from the top-left ----------\nfunction sheetSize(o) {\n  const [a, b] = PAPERS[o.paper];\n  const short = Math.min(a, b);\n  const long = Math.max(a, b);\n  return o.orient === 'portrait' ? [short, long] : [long, short];\n}\n<\/code><\/pre>\n<p>\u06a9\u0627\u063a\u0630 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0641\u0642\u06cc \u0635\u0631\u0641 \u0645\u062e\u062a\u0635\u0631 \u0627\u0648\u0631 \u0644\u0645\u0628\u06cc \u0627\u0637\u0631\u0627\u0641 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-laying-out-the-frame-boxes\">\u0641\u0631\u06cc\u0645 \u0628\u0627\u06a9\u0633 \u06a9\u06cc \u062c\u06af\u06c1 \u06a9\u0627 \u062a\u0639\u06cc\u0646<\/h3>\n<pre><code class=\"language-javascript\">function computeLayout(o, frameCount) {\n  const [W, H] = sheetSize(o);\n  const short = Math.min(W, H);\n  const margin = short * 0.05;\n  const gap = 10;\n  const cols = o.layout === 'page' ? 1 : o.cols;\n  const rows = o.layout === 'page' ? 1 : o.rows;\n  const perSheet = cols * rows;\n  const sheets = Math.max(1, Math.ceil(frameCount \/ perSheet));\n\n  const headH = short * 0.045;              \/\/ the title row at the top of each sheet\n  const top = margin + headH + margin * 0.5;\n  const box = { x: margin, y: top, w: W - 2 * margin, h: H - top - margin };\n  const sizeScale = { s: 0.85, m: 1, l: 1.2 }[o.textSize];\n\n  const cellW = (box.w - (cols - 1) * gap) \/ cols;\n  const cellH = (box.h - (rows - 1) * gap) \/ rows;\n  const cells = [];\n\n  for (let r = 0; r < rows; r++) {\n    for (let c = 0; c < cols; c++) {\n      const x = box.x + c * (cellW + gap);\n      const y = box.y + r * (cellH + gap);\n      const fs = Math.min(13, Math.max(6.5, cellW * 0.05)) * sizeScale;\n      const lh = fs * 1.3;\n\n      if (o.layout === 'notes') {\n        \/\/ picture on the left, title and ruled lines on the right\n        const imgW = Math.min(cellW * 0.5, cellH * 1.6);\n        const tx = x + imgW + 8;\n        cells.push({ img: { x, y, w: imgW, h: cellH }, text: { x: tx, y, w: x + cellW - tx, h: cellH }, fs, lh, notes: true });\n      } else {\n        \/\/ picture on top, text underneath\n        const textH = lh * (1.2 + Number(o.lines)) + fs * 0.6;\n        const imgH = Math.max(10, cellH - textH);\n        cells.push({ img: { x, y, w: cellW, h: imgH }, text: { x, y: y + imgH + fs * 0.6, w: cellW, h: textH - fs * 0.6 }, fs, lh, strip: o.layout === 'strip' });\n      }\n    }\n  }\n  return { W, H, margin, headH, perSheet, sheets, cells };\n}\n<\/code><\/pre>\n<p>\u0645\u0631\u062d\u0644\u06c1 \u0648\u0627\u0631 \u06a9\u06cc\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u06cc\u06c1\u0627\u06ba \u06c1\u06d2:<\/p>\n<ol>\n<li>\u0645\u0627\u0631\u062c\u0646 \u06c1\u06d2 <code>5%<\/code> \u06a9\u0627\u063a\u0630 \u067e\u0631 \u0641\u0679 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0686\u06be\u0648\u0679\u06cc \u0633\u0627\u0626\u06cc\u0688 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u06c1\u06d2\u06d4<\/li>\n<li>\"\u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0641\u06cc \u0635\u0641\u062d\u06c1\" \u0644\u06d2 \u0622\u0624\u0679 \u0627\u06cc\u06a9 1 \u00d7 1 \u06af\u0631\u0688 \u06c1\u06d2\u06d4<\/li>\n<li>\u06a9\u0627\u067e\u06cc\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06c1\u06d2 \u062c\u0633 \u06a9\u0648 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u0641\u06cc \u0634\u06cc\u0679 \u0633\u06d2 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0633 \u06a9\u0648 \u06af\u0648\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/li>\n<li>\u0633\u0628 \u0633\u06d2 \u0627\u0648\u067e\u0631 \u06a9\u06cc \u0642\u0637\u0627\u0631 \u0634\u06cc\u0679 \u06a9\u0627 \u0639\u0646\u0648\u0627\u0646 \u0628\u0646\u06cc \u06c1\u0648\u0626\u06cc \u06c1\u06d2\u06d4<\/li>\n<li>\u0628\u0627\u0642\u06cc \u062e\u0627\u0646\u0648\u06ba \u06a9\u0648 \u0645\u0642\u0631\u0631\u06c1 \u0648\u0642\u0641\u0648\u06ba \u067e\u0631 \u0645\u0633\u0627\u0648\u06cc \u062e\u0644\u06cc\u0648\u06ba \u0645\u06cc\u06ba \u062a\u0642\u0633\u06cc\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/li>\n<li>\u0641\u0648\u0646\u0679 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u0633\u06cc\u0644 \u06a9\u06cc \u0686\u0648\u0691\u0627\u0626\u06cc \u0633\u06d2 \u0637\u06d2 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 (<code>5%<\/code> (\u062c\u0646 \u0645\u06cc\u06ba \u0633\u06d2) \u062f\u0631\u0645\u06cc\u0627\u0646 \u0645\u06cc\u06ba \u0645\u062d\u0641\u0648\u0638 \u06c1\u06d2\u06d4 <code>6.5<\/code> \u0627\u0648\u0631 <code>13<\/code> \u0627\u06cc\u06a9 \u067e\u0648\u0627\u0626\u0646\u0679 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0645\u062a\u0646 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0627\u0633 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/li>\n<li>\u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba\u060c \u062a\u0635\u0648\u06cc\u0631\u06cc\u06ba \u0627\u0648\u067e\u0631 \u0631\u06a9\u06be\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0645\u062a\u0646 \u0646\u06cc\u0686\u06d2 \u0631\u06a9\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u062a\u0646 \u06a9\u06d2 \u0639\u0644\u0627\u0642\u06d2 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u0622\u067e \u06a9\u06d2 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u062f\u06c1 \u0644\u06cc\u0628\u0644 \u0644\u0627\u0626\u0646\u0648\u06ba \u0627\u0648\u0631 \u062a\u0641\u0635\u06cc\u0644\u06cc \u0644\u0627\u0626\u0646\u0648\u06ba \u06a9\u06cc \u062a\u0639\u062f\u0627\u062f \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u06c1\u06d2\u06d4<\/li>\n<li>\"\u0646\u0648\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u06cc\u0646\u0644\" \u0645\u06cc\u06ba \u0628\u0627\u0626\u06cc\u06ba \u0637\u0631\u0641 \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0627\u0648\u0631 \u062f\u0627\u0626\u06cc\u06ba \u0637\u0631\u0641 \u0645\u062a\u0646 \u0627\u0648\u0631 \u062d\u06a9\u0645\u0631\u0627\u0646\u06cc \u0648\u0627\u0644\u06cc \u0644\u06a9\u06cc\u0631\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/li>\n<\/ol>\n<p>\u06c1\u0631 \u0633\u06cc\u0644 <code>img<\/code> \u0628\u0627\u06a9\u0633 \u0627\u0648\u0631 <code>text<\/code> \u06cc\u06c1 \u0628\u0627\u06a9\u0633 \u0645\u06cc\u06ba \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0688\u0631\u0627\u0626\u0646\u06af \u06a9\u0648\u0688 \u06c1\u06cc \u0622\u067e \u06a9\u0648 \u062c\u0627\u0646\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-fitting-an-image-without-stretching-it\">\u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u06a9\u06be\u06cc\u0646\u0686\u06d2 \u0628\u063a\u06cc\u0631 \u0641\u0679 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u062e\u0644\u06cc\u06d2 \u0634\u0627\u0630 \u0648 \u0646\u0627\u062f\u0631 \u06c1\u06cc \u062a\u0635\u0648\u06cc\u0631\u0648\u06ba \u06a9\u06cc \u0637\u0631\u062d \u0646\u0638\u0631 \u0622\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06a9\u06be\u06cc\u0646\u0686\u0646\u0627 \u0686\u06c1\u0631\u06d2 \u0627\u0648\u0631 \u0645\u0635\u0646\u0648\u0639\u0627\u062a \u06a9\u0648 \u0645\u0633\u062e \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0628\u06a9\u06c1 \u06a9\u0679\u0627\u0626\u06cc \u0627\u06c1\u0645 \u062d\u0635\u0648\u06ba \u06a9\u0648 \u06a9\u0627\u0679 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u0644\u06cc\u06d2 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u0628\u0627\u06a9\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0641\u0679 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u06d2\u060c \u062a\u0646\u0627\u0633\u0628 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0645\u0631\u06a9\u0632 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">function fitContain(imgW, imgH, box) {\n  const s = Math.min(box.w \/ imgW, box.h \/ imgH);\n  const w = imgW * s;\n  const h = imgH * s;\n  return { x: box.x + (box.w - w) \/ 2, y: box.y + (box.h - h) \/ 2, w, h };\n}\n<\/code><\/pre>\n<p>\u0645\u062c\u06be\u06d2 \u0628\u06be\u06cc \u06cc\u06c1\u06cc \u0644\u06af\u062a\u0627 \u06c1\u06d2\u06d4 <code>object-fit: contain<\/code> \u0633\u06cc \u0627\u06cc\u0633 \u0627\u06cc\u0633 \u0645\u06cc\u06ba\u06d4 \u062f\u0648 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u06a9\u06d2 \u0639\u0648\u0627\u0645\u0644 \u0645\u06cc\u06ba \u0633\u06d2 \u0686\u06be\u0648\u0679\u06d2 \u06a9\u0648 \u062a\u0631\u062c\u06cc\u062d \u062f\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0645\u062c\u0645\u0648\u0639\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06c1\u0645\u06cc\u0634\u06c1 \u062f\u0631\u0633\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-drawing-a-sheet-on-the-canvas\">\u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u0634\u06cc\u0679 \u06a9\u06be\u06cc\u0646\u0686\u0646\u0627<\/h2>\n<h3 id=\"heading-wrapping-text-into-lines\">\u0645\u062a\u0646 \u06a9\u0648 \u0644\u0627\u0626\u0646\u0648\u06ba \u0633\u06d2 \u062c\u0648\u0691\u06cc\u06ba\u06d4<\/h3>\n<p>\u06a9\u06cc\u0646\u0648\u0633 \u0645\u06cc\u06ba \u0627\u0644\u0641\u0627\u0638 \u06a9\u06cc \u0644\u067e\u06cc\u0679 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 <code>fillText<\/code> \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0644\u0645\u0628\u0627\u0626\u06cc \u06a9\u06cc \u0627\u06cc\u06a9 \u0644\u06a9\u06cc\u0631 \u06a9\u06be\u06cc\u0646\u0686\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0648 \u0622\u067e \u0627\u0644\u0641\u0627\u0638 \u06a9\u06cc \u067e\u06cc\u0645\u0627\u0626\u0634 \u06a9\u0631\u06cc\u06ba\u06d4 <code>measureText<\/code> \u0627\u067e\u0646\u06cc \u0644\u0627\u0626\u0646 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Text ----------\nfunction wrapText(ctx, text, maxWidth, maxLines) {\n  const words = String(text).trim().split(\/s+\/).filter(Boolean);\n  const lines = [];\n  let line=\"\";\n  for (const word of words) {\n    const test = line ? line + ' ' + word : word;\n    if (ctx.measureText(test).width <= maxWidth || !line) {\n      line = test;\n    } else {\n      lines.push(line);\n      line = word;\n    }\n  }\n  if (line) lines.push(line);\n\n  if (lines.length > maxLines) {\n    lines.length = maxLines;\n    let last = lines[maxLines - 1];\n    while (last && ctx.measureText(last + '\u2026').width > maxWidth) last = last.slice(0, -1);\n    lines[maxLines - 1] = last.trimEnd() + '\u2026';\n  }\n  return lines;\n}\n<\/code><\/pre>\n<p>\u0627\u06af\u0631 \u062a\u0641\u0635\u06cc\u0644 \u062f\u0633\u062a\u06cc\u0627\u0628 \u0644\u0627\u0626\u0646\u0648\u06ba \u0633\u06d2 \u0644\u0645\u0628\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u0622\u062e\u0631\u06cc \u0633\u0637\u0631 \u0628\u06cc\u0636\u0648\u06cc \u067e\u0631 \u062e\u062a\u0645 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646 \u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u0645\u062a\u0646 \u0686\u06be\u0648\u0679\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-drawing-labels-titles-and-durations\">\u0688\u0631\u0627\u0626\u0646\u06af \u0644\u06cc\u0628\u0644\u0632\u060c \u0639\u0646\u0648\u0627\u0646\u0627\u062a\u060c \u0627\u0648\u0631 \u0627\u062f\u0648\u0627\u0631<\/h3>\n<pre><code class=\"language-javascript\">function frameLabel(o, index) {\n  if (o.label === 'number') return String(index + 1);\n  if (o.label === 'scene') return `Scene ${index + 1}`;\n  if (o.label === 'shot') return `Shot ${index + 1}`;\n  return '';\n}\n\nfunction drawFrameText(ctx, o, cell, frame, index, k) {\n  const fs = cell.fs * k;\n  const lh = cell.lh * k;\n  const x = cell.text.x * k;\n  const w = cell.text.w * k;\n  let y = cell.text.y * k + fs;\n\n  ctx.fillStyle=\"#16181b\";\n  ctx.textBaseline=\"alphabetic\";\n\n  \/\/ Line 1: label and title on the left, duration on the right\n  const dur = formatDuration(frame.dur);\n  let room = w;\n  if (dur) {\n    ctx.font = `${fs}px ${FONTS.mono}`;\n    ctx.textAlign = 'right';\n    ctx.fillText(dur, x + w, y);\n    room -= ctx.measureText(dur).width + fs;\n  }\n  ctx.textAlign = 'left';\n  const head = [frameLabel(o, index), frame.title.trim()].filter(Boolean).join('  ');\n  if (head) {\n    ctx.font = `bold ${fs}px ${FONTS[o.font]}`;\n    ctx.fillText(wrapText(ctx, head, room, 1)[0] || '', x, y);\n  }\n  y += lh * 1.2;\n\n  \/\/ Description, wrapped and cut to the chosen number of lines\n  ctx.font = `${fs}px ${FONTS[o.font]}`;\n  const maxLines = cell.notes ? Math.floor((cell.text.h * k - lh * 1.2) \/ lh) : Number(o.lines);\n  const lines = frame.desc.trim() ? wrapText(ctx, frame.desc, w, maxLines) : [];\n  lines.forEach((line, j) => ctx.fillText(line, x, y + j * lh));\n\n  \/\/ Ruled lines for handwritten notes\n  if (cell.notes) {\n    ctx.strokeStyle=\"#c9c6bd\";\n    ctx.lineWidth = Math.max(1, 0.6 * k);\n    const bottom = (cell.text.y + cell.text.h) * k;\n    for (let ly = y + lines.length * lh; ly < bottom - 2; ly += lh * 1.25) {\n      ctx.beginPath();\n      ctx.moveTo(x, ly);\n      ctx.lineTo(x + w, ly);\n      ctx.stroke();\n    }\n  }\n}\n<\/code><\/pre>\n<p>\u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631 <code>k<\/code> \u06cc\u06c1 \u067e\u0648\u0627\u0626\u0646\u0679 \u0633\u06d2 \u067e\u06a9\u0633\u0644 \u06a9\u0627 \u062a\u0646\u0627\u0633\u0628 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u067e\u0648\u0632\u06cc\u0634\u0646\u06cc\u06ba \u0644\u06d2 \u0622\u0624\u0679 \u0645\u06cc\u06ba \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u0645\u06cc\u06ba \u0622\u062a\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0646 \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u0636\u0631\u0628 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2: <code>k<\/code> \u0688\u0631\u0627\u0626\u0646\u06af \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u06d4 \u0627\u0633\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u0622\u067e \u0627\u0633\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be 600-\u067e\u06a9\u0633\u0644 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0627\u0648\u0631 300-dpi PDF \u0635\u0641\u062d\u06c1 \u0628\u0646\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062f\u0648\u0631\u0627\u0646\u06cc\u06c1 \u067e\u06c1\u0644\u06d2 \u0627\u0648\u0631 \u062f\u0627\u0626\u06cc\u06ba \u0633\u06cc\u062f\u06be \u0645\u06cc\u06ba \u062a\u06cc\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0644\u06cc\u0628\u0644 \u0627\u0648\u0631 \u0639\u0646\u0648\u0627\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062c\u06af\u06c1 \u06a9\u0648 \u0628\u0627\u0626\u06cc\u06ba \u062c\u0627\u0646\u0628 \u06a9\u06cc \u062c\u06af\u06c1 \u0633\u06d2 \u0645\u0646\u06c1\u0627 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0637\u0631\u062d\u060c \u0637\u0648\u06cc\u0644 \u0639\u0646\u0648\u0627\u0646\u0627\u062a \u0627\u067e\u0646\u06cc \u0645\u062f\u062a \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-drawing-the-whole-sheet\">\u067e\u0648\u0631\u06cc \u0634\u06cc\u0679 \u06a9\u06be\u06cc\u0646\u0686\u06cc\u06ba\u06d4<\/h3>\n<p><code>drawSheet<\/code>    \u0639\u0646\u0648\u0627\u0646 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0634\u06cc\u0679 \u067e\u0631 \u06c1\u0631 \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Drawing one sheet ----------\n\/\/ k turns PDF points into canvas pixels. With mode 'preview' the pictures are\n\/\/ drawn too; with mode 'overlay' their boxes are left transparent for the PDF.\nasync function drawSheet(ctx, o, L, sheetIndex, k, mode) {\n  const W = L.W * k;\n  const H = L.H * k;\n  const placed = [];\n\n  ctx.clearRect(0, 0, W, H);\n  ctx.fillStyle=\"#ffffff\";\n  ctx.fillRect(0, 0, W, H);\n\n  \/\/ Sheet heading: title on the left, total time and sheet number on the right\n  const headFs = L.headH * 0.6 * k;\n  const base = (L.margin + L.headH * 0.78) * k;\n  const total = totalDuration();\n  const right = [total ? `Total ${formatDuration(total)}` : '', `Sheet ${sheetIndex + 1} of ${L.sheets}`].filter(Boolean).join(', ');\n  ctx.font = `${headFs * 0.72}px ${FONTS.mono}`;\n  ctx.fillStyle=\"#55585e\";\n  ctx.textAlign = 'right';\n  ctx.fillText(right, W - L.margin * k, base);\n  if (state.title) {\n    ctx.font = `bold ${headFs}px ${FONTS[o.font]}`;\n    ctx.fillStyle=\"#16181b\";\n    ctx.textAlign = 'left';\n    ctx.fillText(state.title, L.margin * k, base);\n  }\n  ctx.strokeStyle=\"#c9c6bd\";\n  ctx.lineWidth = Math.max(1, 0.75 * k);\n  ctx.beginPath();\n  ctx.moveTo(L.margin * k, (L.margin + L.headH) * k);\n  ctx.lineTo(W - L.margin * k, (L.margin + L.headH) * k);\n  ctx.stroke();\n\n  const start = sheetIndex * L.perSheet;\n  const items = state.frames.slice(start, start + L.perSheet);\n\n  for (let i = 0; i < items.length; i++) {\n    const cell = L.cells[i];\n    const frame = items[i];\n\n    \/\/ Film strip: a dark band with sprocket holes behind the picture\n    if (cell.strip) {\n      const b = cell.img;\n      const hole = b.h * 0.08;\n      ctx.fillStyle=\"#16181b\";\n      ctx.fillRect(b.x * k, b.y * k, b.w * k, b.h * k);\n      ctx.fillStyle=\"#ffffff\";\n      for (let hx = b.x + hole; hx + hole < b.x + b.w; hx += hole * 2) {\n        ctx.fillRect(hx * k, (b.y + hole * 0.3) * k, hole * k, hole * 0.5 * k);\n        ctx.fillRect(hx * k, (b.y + b.h - hole * 0.8) * k, hole * k, hole * 0.5 * k);\n      }\n    }\n\n    const area = cell.strip\n      ? { x: cell.img.x, y: cell.img.y + cell.img.h * 0.12, w: cell.img.w, h: cell.img.h * 0.76 }\n      : cell.img;\n    const rect = fitContain(frame.w, frame.h, area);\n    placed.push({ frame, rect });\n\n    const px = { x: Math.round(rect.x * k), y: Math.round(rect.y * k), w: Math.round(rect.w * k), h: Math.round(rect.h * k) };\n    if (mode === 'overlay') {\n      ctx.clearRect(px.x, px.y, px.w, px.h);\n    } else {\n      if (!frame.thumbPic) frame.thumbPic = await decodeImage(frame.thumb);\n      ctx.drawImage(frame.thumbPic, px.x, px.y, px.w, px.h);\n    }\n    if (!cell.strip) {\n      ctx.strokeStyle=\"#16181b\";\n      ctx.lineWidth = Math.max(1, 0.9 * k);\n      ctx.strokeRect(cell.img.x * k, cell.img.y * k, cell.img.w * k, cell.img.h * k);\n    }\n    drawFrameText(ctx, o, cell, frame, start + i, k);\n  }\n  return placed;\n}\n<\/code><\/pre>\n<p>\u06a9\u06c1 <code>mode<\/code> \u067e\u06cc\u0631\u0627\u0645\u06cc\u0679\u0631\u0632 \u06cc\u06c1\u0627\u06ba \u06a9\u0644\u06cc\u062f\u06cc \u0686\u0627\u0644 \u06c1\u06cc\u06ba\u06d4<\/p>\n<ul>\n<li>\u0645\u06cc\u06ba <code>'preview'<\/code> \u0627\u0633 \u0645\u0648\u0688 \u0645\u06cc\u06ba\u060c \u062a\u0635\u0648\u06cc\u0631 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u0633\u06d2 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/li>\n<li>\u0645\u06cc\u06ba <code>'overlay'<\/code> \u0645\u0648\u0688 \u0645\u06cc\u06ba\u060c \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u0639\u0644\u0627\u0642\u06c1 \u06c1\u06d2\u06d4 <strong>\u062d\u0630\u0641 \u06a9\u0631 \u062f\u06cc\u0627 \u06af\u06cc\u0627<\/strong> \u0622\u0626\u06cc\u06d2 \u0627\u0633\u06d2 \u0634\u0641\u0627\u0641 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0641\u0646\u06a9\u0634\u0646 \u0648\u0627\u067e\u0633 \u0622\u062a\u0627 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u06c1\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4<\/li>\n<\/ul>\n<p>\u0622\u067e \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0633\u06cc\u06a9\u0634\u0646 \u0645\u06cc\u06ba \u06a9\u06cc\u0648\u06ba \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0641\u0644\u0645 \u06a9\u06cc \u067e\u0679\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u067e\u06c1\u0644\u06d2 \u0688\u0627\u0631\u06a9 \u0628\u06cc\u0646\u0688 \u0627\u0648\u0631 \u0622\u0631\u06cc \u0679\u0648\u062a\u06be \u06a9\u06d2 \u0633\u0648\u0631\u0627\u062e \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u067e\u0679\u06cc \u06a9\u06d2 \u0628\u06cc\u0686 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-previewing-the-sheets\">\u0634\u06cc\u0679 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1<\/h2>\n<p>\u06a9\u06cc\u0646\u0648\u0633 \u06a9\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06cc \u0686\u0648\u0691\u0627\u0626\u06cc \u06a9\u0648 \u0688\u06cc\u0648\u0627\u0626\u0633 \u067e\u06a9\u0633\u0644 \u0631\u06cc\u0679 \u0633\u06d2 \u0636\u0631\u0628 \u062f\u06d2 \u06a9\u0631 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0634\u06cc\u0679 \u06a9\u0648 \u0688\u0631\u0627 \u06a9\u0631 \u0627\u0639\u0644\u06cc \u06a9\u062b\u0627\u0641\u062a \u0648\u0627\u0644\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \u0628\u06be\u06cc \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u062a\u06cc\u0632 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Preview ----------\nlet previewTimer = null;\nfunction drawPreviewSoon() {\n  clearTimeout(previewTimer);\n  previewTimer = setTimeout(drawPreview, 150);\n}\n\nasync function drawPreview() {\n  if (!state.frames.length) return;\n  const o = state.opts;\n  const L = computeLayout(o, state.frames.length);\n  state.sheet = Math.min(state.sheet, L.sheets - 1);\n\n  \/\/ Draw at the canvas's on-screen width, sharp on high-density screens\n  const cssWidth = els.canvas.clientWidth || 600;\n  const k = (cssWidth * Math.min(2, window.devicePixelRatio || 1)) \/ L.W;\n  els.canvas.width = Math.round(L.W * k);\n  els.canvas.height = Math.round(L.H * k);\n  await drawSheet(els.canvas.getContext('2d'), o, L, state.sheet, k, 'preview');\n\n  els.sheetInfo.textContent = `Sheet ${state.sheet + 1} of ${L.sheets}`;\n  els.prevBtn.disabled = state.sheet === 0;\n  els.nextBtn.disabled = state.sheet >= L.sheets - 1;\n}\n\nels.prevBtn.addEventListener('click', () => { state.sheet--; drawPreview(); });\nels.nextBtn.addEventListener('click', () => { state.sheet++; drawPreview(); });\n<\/code><\/pre>\n<p>\u0688\u06cc\u0648\u0627\u0626\u0633 \u06a9\u0627 \u067e\u06a9\u0633\u0644 \u062a\u0646\u0627\u0633\u0628 2 \u062a\u06a9 \u0645\u062d\u062f\u0648\u062f \u06c1\u06d2\u06d4 \u0628\u0635\u0648\u0631\u062a \u062f\u06cc\u06af\u0631\u060c 3\u00d7 \u0641\u0648\u0646 \u06a9\u06cc \u0633\u06a9\u0631\u06cc\u0646 CSS \u0628\u0627\u06a9\u0633 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u0633\u06d2 9 \u06af\u0646\u0627 \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u06cc\u0646\u0648\u0633 \u0628\u0646\u0627\u0626\u06d2 \u06af\u06cc\u060c \u062c\u0648 \u0633\u0633\u062a \u06c1\u0648\u06af\u06cc \u0627\u0648\u0631 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0628\u06c1\u062a \u06a9\u0645 \u0627\u0636\u0627\u0641\u06c1 \u06a9\u0631\u06d2 \u06af\u06cc\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621349_514_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"6 \u0641\u0631\u06cc\u0645\u0632\u060c \u0634\u06cc\u0679 \u0679\u0627\u0626\u0679\u0644\u060c \u06a9\u0644 \u0648\u0642\u062a \u0627\u0648\u0631 \u0645\u0639\u0644\u0648\u0645\u0627\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06af\u0631\u0688 \u0634\u06cc\u0679 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" Sheet of title=\"\"><\/p>\n<h2 id=\"heading-saving-a-draft-with-indexeddb\">IndexedDB \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0688\u0631\u0627\u0641\u0679 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u0646\u0627<\/h2>\n<p>30 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644 \u0644\u06a9\u06be\u0646\u06d2 \u0645\u06cc\u06ba \u0648\u0642\u062a \u0644\u06af\u062a\u0627 \u06c1\u06d2\u06d4 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0644\u0648\u0688 \u06a9\u0631\u0646\u0627 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u0627\u0645 \u06a9\u0648 \u06a9\u06be\u0648 \u062f\u06cc\u0646\u0627 \u0645\u0627\u06cc\u0648\u0633 \u06a9\u0646 \u06c1\u0648\u06af\u0627\u060c \u0644\u06c1\u0630\u0627 \u062c\u0628 \u0622\u067e \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0679\u0648\u0644 \u0688\u0631\u0627\u0641\u0679\u0633 \u06a9\u0648 \u0628\u0686\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><code>localStorage<\/code>    \u06c1\u0645 \u06cc\u06c1\u0627\u06ba \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4 \u06cc\u06c1 \u0635\u0631\u0641 \u062a\u0627\u0631\u0648\u06ba \u06a9\u0648 \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0628\u0631\u0627\u0624\u0632\u0631 \u0627\u0633\u06d2 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b 5MB \u062a\u06a9 \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 2 \u0641\u0648\u0646 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0633\u06d2 \u06a9\u0645 \u06c1\u06d2\u06d4 IndexedDB \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u0631\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>Blob<\/code> \u06cc\u06c1 \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u062c\u06af\u06c1 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-opening-the-database\">\u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u06a9\u06be\u0648\u0644\u06cc\u06ba\u06d4<\/h3>\n<pre><code class=\"language-javascript\">\/\/ ---------- Draft in IndexedDB ----------\nconst DB_NAME = 'image-storyboard';\nlet dbPromise = null;\n\nfunction openDb() {\n  if (!dbPromise) {\n    dbPromise = new Promise((resolve, reject) => {\n      const req = indexedDB.open(DB_NAME, 1);\n      req.onupgradeneeded = () => req.result.createObjectStore('drafts');\n      req.onsuccess = () => resolve(req.result);\n      req.onerror = () => reject(req.error);\n    });\n  }\n  return dbPromise;\n}\n\nasync function dbRun(mode, work) {\n  const db = await openDb();\n  return new Promise((resolve, reject) => {\n    const tx = db.transaction('drafts', mode);\n    const result = work(tx.objectStore('drafts'));\n    tx.oncomplete = () => resolve(result && result.result);\n    tx.onerror = () => reject(tx.error);\n  });\n}\n<\/code><\/pre>\n<p><code>dbRun<\/code>    \u0648\u0639\u062f\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0644\u06cc\u0646 \u062f\u06cc\u0646 \u06a9\u0648 \u0644\u067e\u06cc\u0679\u06cc\u06ba\u06d4 \u0645\u06a9\u0645\u0644 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u0644\u06cc\u0646 \u062f\u06cc\u0646 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u062a\u062d\u0631\u06cc\u0631\u0648\u06ba \u06a9\u0648 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u0645\u062d\u0641\u0648\u0638 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u06c1\u06cc \u0645\u06a9\u0645\u0644 \u0628\u062a\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-saving-the-draft\">\u0688\u0631\u0627\u0641\u0679 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u06cc\u06ba<\/h3>\n<pre><code class=\"language-javascript\">let saveTimer = null;\nfunction saveDraftSoon() {\n  clearTimeout(saveTimer);\n  saveTimer = setTimeout(saveDraft, 800);\n}\n\nfunction saveDraft() {\n  const draft = {\n    title: state.title,\n    savedAt: Date.now(),\n    frames: state.frames.map(({ blob, name, title, desc, dur }) => ({ blob, name, title, desc, dur })),\n  };\n  return dbRun('readwrite', (store) => store.put(draft, 'current')).catch(() => {\n    els.resultText.textContent=\"This browser could not save a draft. Download the PDF before closing the tab.\";\n  });\n}\n<\/code><\/pre>\n<p>\u0688\u0631\u0627\u0641\u0679 \u0622\u067e \u06a9\u06d2 \u062f\u0631\u062c \u06a9\u0631\u062f\u06c1 \u0645\u062a\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0635\u0644 \u062a\u0635\u0648\u06cc\u0631\u06cc \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0628\u0644\u0627\u0628 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644\u0632 \u0627\u0648\u0631 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u0644\u06c1\u0630\u0627 \u0627\u0646\u06c1\u06cc\u06ba \u0641\u0627\u0626\u0644 \u0633\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><code>saveDraftSoon<\/code>    \u06cc\u06c1 \u0635\u0627\u0631\u0641 \u06a9\u06d2 800ms \u06a9\u06d2 \u062a\u0648\u0642\u0641 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u06c1\u0631 \u0627\u06cc\u06a9 \u06a9\u06cc \u067e\u0631\u06cc\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0641\u0635\u06cc\u0644 \u0679\u0627\u0626\u067e \u06a9\u0631\u0646\u0627 \u0688\u06cc\u0679\u0627 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u0644\u0627\u06af \u0627\u0646 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<p>\u0645\u062b\u0627\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631\u060c \u0627\u06af\u0631 \u06a9\u0633\u06cc \u067e\u0631\u0627\u0626\u06cc\u0648\u06cc\u0679 \u0648\u0646\u0688\u0648 \u0645\u06cc\u06ba \u0633\u06cc\u0648\u0646\u06af \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0633\u06cc\u0648\u0646\u06af \u0628\u0644\u0627\u06a9 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u0679\u0648\u0644 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0679\u06cc\u0628 \u06a9\u0648 \u0628\u0646\u062f \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u06c1\u062f\u0627\u06cc\u062a \u06a9\u0631\u06d2 \u06af\u0627\u06d4<\/p>\n<h3 id=\"heading-restoring-the-draft\">\u0645\u0633\u0648\u062f\u06c1 \u0628\u062d\u0627\u0644 \u06a9\u0631\u06cc\u06ba<\/h3>\n<p>\u0635\u0641\u062d\u06c1 \u0644\u0648\u0688 \u06c1\u0648\u0646\u06d2 \u067e\u0631\u060c \u0679\u0648\u0644 \u0688\u0631\u0627\u0641\u0679 \u06a9\u0648 \u0686\u06cc\u06a9 \u06a9\u0631\u06d2 \u06af\u0627 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0628\u062d\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u067e\u06cc\u0634\u06a9\u0634 \u06a9\u0631\u06d2 \u06af\u0627\u06d4<\/p>\n<pre><code class=\"language-javascript\">async function checkDraft() {\n  try {\n    const draft = await dbRun('readonly', (store) => store.get('current'));\n    if (!draft || !draft.frames.length) return;\n    els.draftText.textContent = `You have a saved storyboard with ${draft.frames.length} frames.`;\n    els.draftBar.hidden = false;\n  } catch (err) { \/* no storage: nothing to restore *\/ }\n}\n\nels.restoreBtn.addEventListener('click', async () => {\n  const draft = await dbRun('readonly', (store) => store.get('current'));\n  for (const saved of draft.frames) {\n    const file = new File([saved.blob], saved.name, { type: saved.blob.type });\n    const frame = await makeFrame(file);\n    Object.assign(frame, { title: saved.title, desc: saved.desc, dur: saved.dur });\n    state.frames.push(frame);\n  }\n  state.title = draft.title || '';\n  els.boardTitle.value = state.title;\n  showWorkspace();\n  renderFrameList();\n  drawPreview();\n});\n\nels.discardBtn.addEventListener('click', () => {\n  dbRun('readwrite', (store) => store.delete('current'));\n  els.draftBar.hidden = true;\n});\n<\/code><\/pre>\n<p>\u06c1\u0631 \u0645\u062d\u0641\u0648\u0638 \u0634\u062f\u06c1 \u0628\u0644\u0627\u0628 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0648\u0627\u067e\u0633 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2: <code>makeFrame<\/code>\u0644\u06c1\u0630\u0627 \u0628\u062d\u0627\u0644 \u0634\u062f\u06c1 \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u0645\u0644\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0645\u062d\u0641\u0648\u0638 \u0634\u062f\u06c1 \u0645\u062a\u0646 \u06a9\u0648 \u0627\u0633 \u0641\u0631\u06cc\u0645 \u0645\u06cc\u06ba \u06a9\u0627\u067e\u06cc \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-generating-the-pdf-with-pdf-lib\">PDF-lib \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0628\u0646\u0627\u0626\u06cc\u06ba<\/h2>\n<p>\u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u0627 \u0633\u0628 \u0633\u06d2 \u0622\u0633\u0627\u0646 \u0637\u0631\u06cc\u0642\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0634\u06cc\u0679 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u06a9\u06be\u06cc\u0646\u0686\u06cc\u06ba\u060c \u067e\u06be\u0631 \u0627\u0633 \u06a9\u06cc\u0646\u0648\u0633 \u06a9\u0648 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0688\u0627\u0644\u06cc\u06ba\u06d4 \u06cc\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u0646\u06d2 \u067e\u0631 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<ul>\n<li>PNG \u06a9\u06d2 \u0628\u0637\u0648\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u0641\u0627\u0626\u0644 \u0633\u0627\u0626\u0632 \u0628\u0691\u06be \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/li>\n<li>JPEG \u06a9\u06d2 \u0628\u0637\u0648\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a\u060c \u0645\u062a\u0646 \u06a9\u06d2 \u06a9\u0646\u0627\u0631\u06d2 \u0627\u0648\u0631 \u067e\u062a\u0644\u06cc \u0644\u06a9\u06cc\u0631\u06cc\u06ba \u062f\u06be\u0646\u062f\u0644\u06cc \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/li>\n<\/ul>\n<p>\u062a\u0648 \u0622\u0644\u06c1 \u06c1\u06d2 <strong>\u062f\u0648 \u062a\u06c1\u0648\u06ba<\/strong> \u06c1\u0631 \u0635\u0641\u062d\u06d2 \u067e\u0631:<\/p>\n<ol>\n<li><strong>\u0641\u0644\u0645<\/strong> JPEG \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u062f\u06c1 \u0631\u06cc\u0632\u0648\u0644\u0648\u0634\u0646 \u067e\u0631\u060c \u0628\u0627\u0644\u06a9\u0644 \u0628\u0627\u06a9\u0633 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/li>\n<li><strong>\u0645\u062a\u0646\u060c \u0644\u06cc\u0628\u0644\u0632\u060c \u0627\u0648\u0631 \u0644\u0627\u0626\u0646\u06cc\u06ba\u06d4<\/strong> \u067e\u0648\u0631\u06d2 \u0627\u0648\u067e\u0631\u06cc \u0635\u0641\u062d\u06d2 \u06a9\u0648 300 dpi \u067e\u0631 \u0634\u0641\u0627\u0641 PNG \u0633\u06d2 \u0688\u06be\u0627\u0646\u067e\u06cc\u06ba\u06d4<\/li>\n<\/ol>\n<p>JPEG \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u06c1\u06d2\u060c \u062c\u0628\u06a9\u06c1 PNG \u0645\u062a\u0646 \u06a9\u0648 \u062a\u06cc\u0632 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1\u06cc \u0648\u062c\u06c1 \u06c1\u06d2\u06d4 <code>drawSheet<\/code> \u06c1\u06d2 <code>'overlay'<\/code> \u0627\u06cc\u06a9 \u0645\u0648\u0688 \u062c\u0648 \u0627\u06cc\u06a9 \u0633\u0648\u0631\u0627\u062e \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u0627 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u062a\u0635\u0648\u06cc\u0631 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-turning-each-picture-into-a-jpeg\">\u06c1\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 JPEG \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<pre><code class=\"language-javascript\">\/\/ ---------- Making the PDF ----------\nasync function imageAsJpeg(frame, widthPx, heightPx) {\n  const pic = await decodeImage(frame.blob);\n  const c = document.createElement('canvas');\n  c.width = Math.max(1, Math.round(widthPx));\n  c.height = Math.max(1, Math.round(heightPx));\n  const ctx = c.getContext('2d');\n  ctx.fillStyle=\"#ffffff\";              \/\/ transparent PNGs get a white background\n  ctx.fillRect(0, 0, c.width, c.height);\n  ctx.imageSmoothingQuality = 'high';\n  ctx.drawImage(pic, 0, 0, c.width, c.height);\n  if (pic.close) pic.close();\n  const blob = await canvasToBlob(c, 'image\/jpeg', 0.9);\n  return new Uint8Array(await blob.arrayBuffer());\n}\n<\/code><\/pre>\n<p>\u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0633\u06d2 \u0688\u06cc \u06a9\u0648\u0688 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2: <strong>\u0627\u0635\u0644<\/strong> \u0686\u0648\u0646\u06a9\u06c1 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0641\u0627\u0626\u0644 \u06c1\u06d2 \u0646\u06c1 \u06a9\u06c1 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u06a9\u0627 \u0645\u0639\u06cc\u0627\u0631 \u0627\u0639\u0644\u06cc\u0670 \u062a\u0631\u06cc\u0646 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-building-the-pages\">\u0639\u0645\u0627\u0631\u062a \u06a9\u06d2 \u0635\u0641\u062d\u0627\u062a<\/h3>\n<pre><code class=\"language-javascript\">async function buildPdf() {\n  const { PDFDocument } = PDFLib;\n  const o = state.opts;\n  const L = computeLayout(o, state.frames.length);\n  const dpi = Number(els.quality.value);\n  const k = 300 \/ 72;                         \/\/ text layer at 300 dpi\n\n  const pdf = await PDFDocument.create();\n  for (let s = 0; s < L.sheets; s++) {\n    els.resultText.textContent = `Making sheet ${s + 1} of ${L.sheets}...`;\n    const page = pdf.addPage([L.W, L.H]);\n\n    \/\/ 1. Text, labels and lines on a canvas, with holes where the pictures go\n    const c = document.createElement('canvas');\n    c.width = Math.round(L.W * k);\n    c.height = Math.round(L.H * k);\n    const placed = await drawSheet(c.getContext('2d'), o, L, s, k, 'overlay');\n\n    \/\/ 2. Each picture as a JPEG at the chosen resolution, placed in its hole\n    for (const { frame, rect } of placed) {\n      const scale = Math.min(1, (rect.w * dpi \/ 72) \/ frame.w);\n      const jpg = await pdf.embedJpg(await imageAsJpeg(frame, frame.w * scale, frame.h * scale));\n      \/\/ PDF y runs from the bottom of the page, the canvas y from the top\n      page.drawImage(jpg, { x: rect.x, y: L.H - rect.y - rect.h, width: rect.w, height: rect.h });\n    }\n\n    \/\/ 3. The text layer on top, as one transparent PNG covering the page\n    const pngBlob = await canvasToBlob(c, 'image\/png');\n    const png = await pdf.embedPng(new Uint8Array(await pngBlob.arrayBuffer()));\n    page.drawImage(png, { x: 0, y: 0, width: L.W, height: L.H });\n    c.width = 1;                               \/\/ free the canvas memory\n  }\n\n  pdf.setTitle(state.title || 'Storyboard');\n  return pdf.save();\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba \u06c1\u0631 \u0635\u0641\u062d\u06c1 \u067e\u0631 \u06a9\u06cc\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2:<\/p>\n<ol>\n<li><code>addPage([L.W, L.H])<\/code>    \u067e\u0648\u0627\u0626\u0646\u0679 \u06cc\u0648\u0646\u0679\u0633 \u0645\u06cc\u06ba \u0635\u0641\u062d\u0627\u062a \u0628\u0646\u0627\u0626\u06cc\u06ba\u060c \u062c\u0648 \u06a9\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u06c1\u06cc \u06cc\u0648\u0646\u0679 \u06c1\u06cc\u06ba\u06d4<\/li>\n<li>\u0645\u062a\u0646 \u06a9\u06cc \u067e\u0631\u062a \u0627\u0633 \u067e\u0631 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u06af\u0626\u06cc \u06c1\u06d2: <code>k = 300 \/ 72<\/code>\u06cc\u06c1 300 \u067e\u06a9\u0633\u0644\u0632 \u0641\u06cc \u0627\u0646\u0686 \u06c1\u06d2\u06d4<\/li>\n<li>\u06c1\u0631 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u0627\u0633 \u0688\u06cc \u067e\u06cc \u0622\u0626\u06cc \u067e\u0631 \u0686\u06be\u0648\u0679\u0627 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0622\u067e \u0635\u0641\u062d\u06c1 \u067e\u0631 \u0627\u0633 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u0648 \u0641\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 4000 \u067e\u06a9\u0633\u0644 \u062a\u0635\u0648\u06cc\u0631 \u062c\u0648 2 \u0627\u0646\u0686 \u0686\u0648\u0691\u0627\u0626\u06cc \u0645\u06cc\u06ba \u062f\u06a9\u06be\u0627\u0626\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u0622\u067e \u06a9\u06cc \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u0686\u06be\u0648\u0679\u0627 \u0631\u06a9\u06be\u062a\u06d2 \u06c1\u0648\u0626\u06d2\u060c 300 dpi \u067e\u0631 \u0635\u0631\u0641 600 \u067e\u06a9\u0633\u0644\u0632 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 <code>Math.min(1, ...)<\/code> \u0686\u06be\u0648\u0679\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0648 \u06a9\u0628\u06be\u06cc \u0628\u06be\u06cc \u0628\u0691\u0627 \u0646\u06c1 \u06a9\u0631\u06cc\u06ba\u06d4<\/li>\n<li>\u062a\u0635\u0648\u06cc\u0631 \u067e\u06c1\u0644\u06d2 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u0627\u0648\u0631 \u067e\u06be\u0631 \u0627\u0633 \u06a9\u06d2 \u0627\u0648\u067e\u0631 \u0634\u0641\u0627\u0641 PNG \u06a9\u06be\u06cc\u0646\u0686\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/li>\n<\/ol>\n<p>\u0628\u0631\u0627\u06c1 \u06a9\u0631\u0645 y \u06a9\u0648\u0622\u0631\u0688\u06cc\u0646\u06cc\u0679 \u0633\u06d2 \u0631\u062c\u0648\u0639 \u06a9\u0631\u06cc\u06ba\u06d4 <code>L.H - rect.y - rect.h<\/code>. \u0644\u06d2 \u0622\u0624\u0679 \u0627\u0648\u0631 \u06a9\u06cc\u0646\u0648\u0633 <strong>\u0633\u0628 \u0633\u06d2 \u0627\u0648\u067e\u0631<\/strong> \u0635\u0641\u062d\u06c1 \u06a9\u06cc Y \u06a9\u06cc \u067e\u06cc\u0645\u0627\u0626\u0634 \u06a9\u0631\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 <strong>\u0646\u06cc\u0686\u06d2<\/strong>. \u0627\u06af\u0631 \u0622\u067e \u0627\u0633\u06d2 \u067e\u0644\u0679\u0646\u0627 \u0628\u06be\u0648\u0644 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0635\u0641\u062d\u06c1 \u067e\u0631 \u0645\u0648\u062c\u0648\u062f \u062a\u0645\u0627\u0645 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0627\u0644\u0679\u06cc \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633\u06a9 PDF-lib \u063a\u0644\u0637\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0627\u062d\u0648\u0644 <code>c.width = 1<\/code> \u06a9\u06cc\u0646\u0648\u0633 \u0645\u06cc\u0645\u0648\u0631\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u0641\u0648\u0631\u0627\u064b \u0628\u0639\u062f \u062c\u0627\u0631\u06cc \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u062c\u0628 \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u0633\u06cc\u0679\u06cc\u06ba \u06c1\u0648\u06ba \u062a\u0648 \u06cc\u06c1 \u0641\u0648\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06c1\u0645 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-renaming-and-downloading\">\u0646\u0627\u0645 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u0641\u0627\u0626\u0644 \u06a9\u0627 \u0646\u0627\u0645 \u0679\u06cc\u06a9\u0633\u0679 \u0641\u06cc\u0644\u0688 \u0633\u06d2 \u0644\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u062c\u0633 \u0645\u06cc\u06ba \u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0646\u0627\u0645\u0648\u06ba \u0645\u06cc\u06ba \u062d\u0631\u0648\u0641 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Download ----------\nfunction cleanFileName(name) {\n  const n = name.trim().replace(\/.pdf$\/i, '').replace(\/[\\\/:*?\"<>|]+\/g, '-');\n  return (n || 'storyboard') + '.pdf';\n}\n\nfunction formatSize(bytes) {\n  return bytes < 1024 * 1024 ? `${Math.round(bytes \/ 1024)} KB` : `${(bytes \/ 1024 \/ 1024).toFixed(1)} MB`;\n}\n\nels.downloadBtn.addEventListener('click', async () => {\n  if (!state.frames.length) return;\n  els.downloadBtn.disabled = true;\n  try {\n    const bytes = await buildPdf();\n    const name = cleanFileName(els.fileName.value);\n    const url = URL.createObjectURL(new Blob([bytes], { type: 'application\/pdf' }));\n    const a = document.createElement('a');\n    a.href = url;\n    a.download = name;\n    a.click();\n    setTimeout(() => URL.revokeObjectURL(url), 60000);\n    els.resultText.textContent = `Saved ${name} (${formatSize(bytes.length)}).`;\n  } catch (err) {\n    console.error(err);\n    els.resultText.textContent=\"The PDF could not be made. Try fewer images or the 150 dpi setting.\";\n  } finally {\n    els.downloadBtn.disabled = false;\n  }\n});\n<\/code><\/pre>\n<p>\u0622\u0628\u062c\u06cc\u06a9\u0679 URL \u06a9\u0648 \u0627\u06cc\u06a9 \u0645\u0646\u0679 \u06a9\u06d2 \u0628\u0639\u062f \u0645\u0646\u0633\u0648\u062e \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u0634\u0631\u0648\u0639 \u06c1\u0648\u0646\u06d2 \u0627\u0648\u0631 \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0648 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0622\u0632\u0627\u062f \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0627\u0641\u06cc \u0648\u0642\u062a \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0628\u0679\u0646 \u063a\u06cc\u0631 \u0641\u0639\u0627\u0644 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0627\u06cc\u06a9 \u0688\u0628\u0644 \u06a9\u0644\u06a9 \u062f\u0648 \u0628\u0631\u0622\u0645\u062f\u0627\u062a \u0634\u0631\u0648\u0639 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u0627\u06d4<\/p>\n<p>\u0622\u062e\u0631 \u0645\u06cc\u06ba\u060c \"\u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639\" \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0627\u0633\u0679\u06cc\u0679\u0633\u060c \u0688\u0631\u0627\u0641\u0679 \u0627\u0648\u0631 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u0635\u0627\u0641 \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06d2\u06d4 \u0641\u0627\u0626\u0644 \u06a9\u06cc \u0622\u062e\u0631\u06cc \u062f\u0648 \u0633\u0637\u0631\u06cc\u06ba \u062a\u0631\u062c\u06cc\u062d\u0627\u062a \u06a9\u0648 \u067e\u0691\u06be\u062a\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0635\u0641\u062d\u06c1 \u0644\u0648\u0688 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u062f\u06c1 \u0645\u0633\u0648\u062f\u0648\u06ba \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-javascript\">\/\/ ---------- Start over ----------\nels.resetBtn.addEventListener('click', () => {\n  clearTimeout(saveTimer);\n  state.frames.forEach((f) => URL.revokeObjectURL(f.thumbUrl));\n  state.frames = [];\n  state.title=\"\";\n  state.sheet = 0;\n  state.lastDeleted = null;\n  els.boardTitle.value=\"\";\n  els.undoBtn.hidden = true;\n  els.resultText.textContent=\"\";\n  els.workspace.hidden = true;\n  els.uploadArea.hidden = false;\n  dbRun('readwrite', (store) => store.delete('current')).catch(() => {});\n});\n\nreadSettings();\ncheckDraft();\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621350_352_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u0646\u0627\u0645 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2\u060c \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06d2 \u0645\u0639\u06cc\u0627\u0631 \u06a9\u0648 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0645\u062e\u062a\u0644\u0641 \u0627\u062e\u062a\u06cc\u0627\u0631\u0627\u062a\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h2 id=\"heading-demo-how-the-image-storyboard-tool-works\">\u0688\u06cc\u0645\u0648: \u0627\u0645\u06cc\u062c \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0679\u0648\u0644 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/h2>\n<p>\u062a\u06cc\u0627\u0631 \u0634\u062f\u06c1 \u0679\u0648\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u06a9\u0645\u0644 \u0648\u0631\u06a9 \u0641\u0644\u0648 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06c1\u06d2:<\/p>\n<h3 id=\"heading-step-1-add-your-images\">\u0645\u0631\u062d\u0644\u06c1 1: \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0635\u0641\u062d\u06c1 \u067e\u0631 \u0641\u0648\u0644\u0688\u0631 \u06a9\u06cc \u0642\u0627\u0628\u0644 \u0642\u062f\u0631 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0631\u06a9\u06be\u06cc\u06ba \u06cc\u0627 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u06cc\u06ba \u067e\u0631 \u06a9\u0644\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4 \u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0646\u0627\u0645 \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0627 \u06af\u06cc\u0627\u060c \u062a\u0648 <code>shot-1<\/code>, <code>shot-2<\/code> \u2026 <code>shot-10<\/code> \u0635\u062d\u06cc\u062d \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u0632\u0645\u06cc\u0646\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621350_336_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"5ad4654c-d0d8-49f6-b6c1-737407aa1c1d\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-step-2-put-the-frames-in-order\">\u0645\u0631\u062d\u0644\u06c1 2: \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u0633\u06d2 \u0631\u06a9\u06be\u06cc\u06ba<\/h3>\n<p>\u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u06a9\u0648 \u062f\u0648\u0633\u0631\u06d2 \u06a9\u0627\u0631\u0688 \u067e\u0631 \u06af\u06be\u0633\u06cc\u0679\u06cc\u06ba \u06cc\u0627 \u0627\u0648\u067e\u0631 \u0627\u0648\u0631 \u0646\u06cc\u0686\u06d2 \u0628\u0679\u0646 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621350_902_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u0641\u0631\u06cc\u0645 \u06a9\u0648 \u0646\u0626\u06cc \u062c\u06af\u06c1 \u067e\u0631 \u06af\u06be\u0633\u06cc\u0679 \u0644\u06cc\u0627 \u06af\u06cc\u0627\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-step-3-write-the-script\">\u0645\u0631\u062d\u0644\u06c1 3: \u0627\u0633\u06a9\u0631\u067e\u0679 \u0644\u06a9\u06be\u06cc\u06ba\u06d4<\/h3>\n<p>\u06c1\u0631 \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u0627\u06cc\u06a9 \u0639\u0646\u0648\u0627\u0646\u060c \u062a\u0641\u0635\u06cc\u0644 \u0627\u0648\u0631 \u062f\u0648\u0631\u0627\u0646\u06cc\u06c1 \u062f\u06cc\u06ba\u06d4 \u062c\u06cc\u0633\u06d2 \u06c1\u06cc \u0622\u067e \u062f\u0627\u062e\u0644 \u06c1\u0648\u06ba \u06af\u06d2\u060c \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u0627 \u06a9\u0644 \u0648\u0642\u062a \u0627\u067e \u0688\u06cc\u0679 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621350_553_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"    \u06a9\u0626\u06cc \u0641\u0631\u06cc\u0645 \u06a9\u0627\u0631\u0688\u0632 \u0628\u06be\u0631\u06d2 \u06c1\u0648\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-step-4-choose-a-layout\">\u0645\u0631\u062d\u0644\u06c1 4: \u0627\u06cc\u06a9 \u0644\u06d2 \u0622\u0624\u0679 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0641\u06cc \u0635\u0641\u062d\u06c1 \u0627\u06cc\u06a9 \u0641\u0631\u06cc\u0645\u060c \u06af\u0631\u0688\u060c \u06cc\u0627 \u0646\u0648\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u06cc\u0646\u0644 \u06cc\u0627 \u0641\u0644\u0645 \u06a9\u06cc \u067e\u0679\u06cc \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u06cc\u06ba\u060c \u067e\u06be\u0631 \u06a9\u0627\u063a\u0630 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u0627\u0648\u0631 \u0648\u0627\u0642\u0641\u06cc\u062a \u0633\u06cc\u0679 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621351_915_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u062a\u0631\u062a\u06cc\u0628 \u06a9\u0627 \u067e\u06cc\u0646\u0644 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u062f\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u06d2 \u0633\u0627\u062a\u06be\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-step-5-check-the-preview\">\u0645\u0631\u062d\u0644\u06c1 5: \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0686\u06cc\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062a\u0645\u0627\u0645 \u0634\u06cc\u0679\u0633 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u0686\u06be\u0644\u0627 \u0627\u0648\u0631 \u0627\u06af\u0644\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621351_758_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u0641\u0631\u06cc\u0645 \u06a9\u0627 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h3 id=\"heading-step-6-download-the-pdf\">\u0645\u0631\u062d\u0644\u06c1 6: \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0641\u0627\u0626\u0644 \u06a9\u0627 \u0646\u0627\u0645 \u062f\u0631\u062c \u06a9\u0631\u06cc\u06ba\u060c \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u0645\u0639\u06cc\u0627\u0631 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 PDF \u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u067e\u0631 \u06a9\u0644\u06a9 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/11\/1794621351_831_\u062c\u0627\u0648\u0627-\u0627\u0633\u06a9\u0631\u067e\u0679-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u0631\u062a\u06d2-\u06c1\u0648\u0626\u06d2-\u067e\u06cc-\u0688\u06cc-\u0627\u06cc\u0641-\u0679\u0648\u0644.png\" alt=\"\u0688\u0627\u0624\u0646 \u0644\u0648\u0688 \u06a9\u0631\u062f\u06c1 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0648\u06cc\u0648\u0631 \u0645\u06cc\u06ba \u06a9\u06be\u0644\u062a\u06cc \u06c1\u06d2\u06d4\" style=\"display: block;\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<h2 id=\"heading-performance-tips\">\u06a9\u0627\u0631\u06a9\u0631\u062f\u06af\u06cc \u06a9\u06cc \u062a\u062c\u0627\u0648\u06cc\u0632<\/h2>\n<p><strong>\u0627\u067e\u0646\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644\u0632 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/strong> \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u062f\u0627\u062e\u0644 \u06c1\u0648\u0646\u06d2 \u0627\u0648\u0631 \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06c1\u06cc \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u06a9\u062b\u0631\u062a \u0633\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u06cc\u0627\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u067e\u0648\u0631\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 1000 \u067e\u06a9\u0633\u0644 \u06a9\u0627 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u06a9\u06be\u06cc\u0646\u0686\u06cc\u06ba \u06af\u06d2 \u062a\u0648 \u06cc\u06c1 \u062a\u06cc\u0632 \u062a\u0631 \u06c1\u0648\u06af\u0627\u06d4 \u0635\u0631\u0641 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0627\u06cc\u06a9\u0633\u067e\u0648\u0631\u0679 \u0627\u0635\u0644 \u0641\u0627\u0626\u0644 \u06a9\u0648 \u0645\u062a\u0627\u062b\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u06a9\u0648 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0688\u06cc \u06a9\u0648\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/strong> \u0645\u06cc\u06ba <code>drawSheet<\/code>\u06c1\u0631 \u0641\u0631\u06cc\u0645 \u0688\u06cc \u06a9\u0648\u0688 \u0634\u062f\u06c1 \u062a\u06be\u0645\u0628 \u0646\u06cc\u0644 \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 <code>frame.thumbPic<\/code>\u0644\u06c1\u0630\u0627 \u0634\u06cc\u0679\u0633 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0688\u06cc \u06a9\u0648\u0688 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/p>\n<p><strong>\u0627\u06cc\u06a9 \u0648\u0642\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u06cc\u06ba\u06d4<\/strong> \u062f\u0631\u062c\u0646\u0648\u06ba \u0628\u0691\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u067e\u0691\u06be\u06cc\u06ba \u06cc\u0627 \u0628\u0631\u0622\u0645\u062f \u06a9\u0631\u06cc\u06ba\u06d4 <code>Promise.all<\/code> \u06cc\u06c1 \u0622\u067e \u06a9\u06d2 \u0641\u0648\u0646 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06cc\u0645\u0648\u0631\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0633\u0627\u062f\u06c1 <code>for<\/code> \u0644\u0648\u067e <code>await<\/code> \u0627\u06cc\u06a9 \u0648\u0642\u062a \u0645\u06cc\u06ba \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0628\u0691\u06cc \u062a\u0635\u0648\u06cc\u0631 \u0645\u06cc\u0645\u0648\u0631\u06cc \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u0635\u0641\u062d\u06c1 \u067e\u0631 \u0641\u0679 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u067e\u0646\u06cc \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u0627 \u0633\u0627\u0626\u0632 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba\u060c \u0646\u06c1 \u06a9\u06c1 \u06a9\u06cc\u0645\u0631\u06c1\u06d4<\/strong> \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u062a\u0635\u0648\u06cc\u0631 \u06a9\u0627 \u067e\u06a9\u0633\u0644 \u0633\u0627\u0626\u0632 \u0635\u0641\u062d\u06c1 \u067e\u0631 \u0627\u0633 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u0627\u0648\u0631 \u0622\u067e \u06a9\u06d2 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631\u062f\u06c1 \u0688\u06cc \u067e\u06cc \u0622\u0626\u06cc \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u06d2\u06d4 \u0627\u0633 \u0627\u06cc\u06a9 \u0644\u0627\u0626\u0646 \u0645\u06cc\u06ba <code>buildPdf<\/code> \u06cc\u06c1 \u0627\u06a9\u062b\u0631 3MB \u0641\u0627\u0626\u0644 \u0627\u0648\u0631 60MB \u0641\u0627\u0626\u0644 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u062c\u0627\u062a\u06d2 \u062c\u0627\u062a\u06d2 \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0648 \u062e\u0627\u0644\u06cc \u06a9\u0631\u06cc\u06ba\u06d4<\/strong> \u06a9\u0627\u0644 <code>close()<\/code> \u06a9\u0648 <code>ImageBitmap<\/code> \u062c\u0628 \u0622\u067e \u06a9\u0627\u0645 \u06a9\u0631 \u0644\u06cc\u06ba\u060c \u0648\u06c1 \u06a9\u06cc\u0646\u0648\u0633 \u0633\u06cc\u0679 \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u0622\u067e \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u062a\u06be\u06d2: <code>width = 1<\/code>\u0622\u0628\u062c\u06cc\u06a9\u0679 \u06cc\u0648 \u0622\u0631 \u0627\u06cc\u0644 \u06a9\u0648 \u0645\u0646\u0633\u0648\u062e \u06a9\u0631\u06cc\u06ba \u062c\u0646 \u06a9\u06cc \u0645\u0632\u06cc\u062f \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-common-mistakes\">\u0639\u0627\u0645 \u063a\u0644\u0637\u06cc\u0627\u06ba<\/h2>\n<p><strong>\u0633\u0627\u0626\u06cc\u0688 \u0648\u06cc\u0632 \u0641\u0648\u0646 \u06a9\u06cc \u062a\u0635\u0648\u06cc\u0631\u06d4<\/strong> \u0627\u06af\u0631 \u0622\u067e \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u0648 \u067e\u0691\u06be\u06d2 \u0628\u063a\u06cc\u0631 \u06cc\u0627 EXIF \u200b\u200b\u0627\u0648\u0631\u06cc\u0646\u0679\u06cc\u0634\u0646 \u06a9\u0627 \u0627\u0637\u0644\u0627\u0642 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0688\u0631\u0627 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u067e\u0648\u0631\u0679\u0631\u06cc\u0679 \u0627\u0641\u0642\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0633\u0627\u0645\u0646\u06d2 \u0622\u0626\u06d2 \u06af\u0627\u06d4 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba <code>createImageBitmap(blob, { imageOrientation: 'from-image' })<\/code>.<\/p>\n<p><strong>\u062a\u0648\u0633\u06cc\u0639\u06cc \u062a\u0635\u0648\u06cc\u0631\u06d4<\/strong> \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0633\u06cc\u0644 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631 \u06a9\u06be\u06cc\u0646\u0686\u06cc\u06ba\u06d4 <code>drawImage(img, x, y, cellW, cellH)<\/code> \u0627\u0633 \u0645\u06cc\u06ba \u0627\u0636\u0627\u0641\u06c1 \u06a9\u0631\u06cc\u06ba\u06d4 \u06c1\u0645\u06cc\u0634\u06c1 \u062f\u0631\u062c \u0630\u06cc\u0644 \"\u0634\u0627\u0645\u0644\" \u062d\u0633\u0627\u0628 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba: <code>fitContain<\/code> \u067e\u06c1\u0644\u06d2<\/p>\n<p><strong>\u0641\u0627\u0626\u0644\u06cc\u06ba \u063a\u0644\u0637 \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/strong> \u0622\u0631\u0688\u0631 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u06d2 \u0641\u0627\u0626\u0644 \u0686\u0646\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0633\u06d2 \u067e\u06c1\u0646\u0686\u0646\u06d2 \u06cc\u0627 \u06af\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0645\u0627\u0646\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0648\u0631 \u0639\u062f\u062f\u06cc \u062a\u0631\u062a\u06cc\u0628 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u06ba\u06d4 <code>shot-10<\/code> \u06a9\u06d2 \u0628\u0639\u062f \u0622\u062a\u0627 \u06c1\u06d2 <code>shot-9<\/code>.<\/p>\n<p><strong>\u0645\u06cc\u06ba y-axis \u06a9\u0648 \u067e\u0644\u0679\u0646\u0627 \u0628\u06be\u0648\u0644 \u06af\u06cc\u0627\u06d4<\/strong> Canvas y \u0627\u0648\u067e\u0631 \u0633\u06d2 \u0646\u06cc\u0686\u06d2 \u06a9\u06cc \u0637\u0631\u0641 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 PDF y \u0646\u06cc\u0686\u06d2 \u0633\u06d2 \u0627\u0648\u067e\u0631 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>pageHeight - y - height<\/code> PDF-lib \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0686\u06be \u0628\u06be\u06cc \u062a\u0639\u06cc\u0646\u0627\u062a \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a\u06d4<\/p>\n<p><strong>\u0634\u0641\u0627\u0641 PNG \u06a9\u0627 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0633\u06cc\u0627\u06c1 \u06c1\u06d2\u06d4<\/strong> JPEG \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u0634\u0641\u0627\u0641\u06cc\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 PNG \u06a9\u0648 JPEG \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u06a9\u06cc\u0646\u0648\u0633 \u06a9\u0648 \u0633\u0641\u06cc\u062f \u0633\u06d2 \u0628\u06be\u0631\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0635\u0627\u0631\u0641 \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0641\u06c1\u0631\u0633\u062a \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/strong> \u0627\u06af\u0631 \u0645\u06cc\u06ba \u062c\u0628 \u0628\u06be\u06cc \u06a9\u0648\u0626\u06cc \u06a9\u0644\u06cc\u062f \u062f\u0628\u0627\u062a\u0627 \u06c1\u0648\u06ba \u062a\u0648 \u0627\u0646 \u067e\u0679 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0631\u06cc\u0646\u0688\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u060c \u06a9\u0631\u0633\u0631 \u062d\u0631\u06a9\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062a\u0648\u062c\u06c1 \u06a9\u06be\u0648 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u067e\u0646\u06cc \u062d\u06cc\u062b\u06cc\u062a \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u06cc\u06ba\u06d4 <code>input<\/code> \u0627\u06cc\u0648\u0646\u0679\u0633 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0641\u06c1\u0631\u0633\u062a \u06a9\u0648 \u0635\u0631\u0641 \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0628\u06c1\u062a \u0628\u0691\u0627 \u06a9\u06cc\u0646\u0648\u0633\u06d4<\/strong> \u0628\u0631\u0627\u0624\u0632\u0631 \u06a9\u06cc\u0646\u0648\u0633 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u0648 \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0648\u0646 \u06a9\u06cc \u0633\u062e\u062a \u062d\u062f\u0648\u062f \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 300 dpi \u067e\u0631 A3 \u0635\u0641\u062d\u06c1 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b 4960 \u00d7 3508 \u067e\u06a9\u0633\u0644\u0632 \u06a9\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0648 \u0679\u06be\u06cc\u06a9 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0622\u0644\u06d2 \u06a9\u06d2 \u067e\u06a9\u0633\u0644 \u062a\u0646\u0627\u0633\u0628 \u0633\u06d2 \u0636\u0631\u0628 \u0646\u06c1 \u062f\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>\u0627\u0633 \u0679\u06cc\u0648\u0679\u0648\u0631\u06cc\u0644 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u0646\u06d2 \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u06d2 \u0633\u06cc\u0679 \u06a9\u0648 \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0634\u06cc\u0679\u0633 \u0627\u0648\u0631 \u067e\u0631\u0646\u0679\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0631\u0627\u0624\u0632\u0631 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0679\u0648\u0644 \u0628\u0646\u0627\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0622\u067e \u0646\u06d2 \u0627\u067e\u0646\u06d2 \u0641\u0648\u0646 \u067e\u0631 \u0641\u0648\u0679\u0648 \u0631\u0648\u0679\u06cc\u0634\u0646 \u0644\u06af\u0627\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1 \u0633\u06cc\u06a9\u06be\u0627\u06d4 <code>createImageBitmap<\/code>\u0641\u0627\u0626\u0644 \u06a9\u06d2 \u0646\u0627\u0645\u0648\u06ba \u06a9\u0648 \u0639\u062f\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u06ba\u060c \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u067e\u0631 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u06d2 \u062d\u0633\u0627\u0628\u0627\u062a \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u06cc\u06ba \u062a\u0627\u06a9\u06c1 \u067e\u06cc\u0634 \u0646\u0638\u0627\u0631\u06c1 \u0627\u0648\u0631 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u06c1\u0645\u06cc\u0634\u06c1 \u0645\u0645\u0627\u062b\u0644 \u06c1\u0648\u06ba\u060c \u0645\u062a\u0646 \u06a9\u0648 \u06a9\u06cc\u0646\u0648\u0633 \u067e\u0631 \u0644\u067e\u06cc\u0679\u06cc\u06ba\u060c \u0627\u0646\u0688\u06cc\u06a9\u0633\u0688 \u0688\u06cc \u0628\u06cc \u0645\u06cc\u06ba \u0627\u0645\u06cc\u062c \u0627\u0648\u0631 \u0679\u06cc\u06a9\u0633\u0679 \u0688\u0631\u0627\u0641\u0679 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062a\u06cc\u0632 \u0679\u06cc\u06a9\u0633\u0679 \u0627\u0648\u0631 \u06a9\u0645\u067e\u06cc\u06a9\u0679 \u062a\u0635\u0627\u0648\u06cc\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062f\u0648 \u067e\u0631\u062a\u0648\u06ba \u0648\u0627\u0644\u06d2 PDFs \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 PDF-lib \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u0628\u0631\u0627\u0624\u0632\u0631 \u0645\u06cc\u06ba \u06c1\u0631 \u0686\u06cc\u0632 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0686\u0644\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0622\u0644\u06d2 \u067e\u0631 \u0631\u06c1\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0622\u067e \u0627\u0633 \u0679\u0648\u0644 \u06a9\u0627 \u0645\u06a9\u0645\u0644 \u0648\u0631\u0698\u0646 \u0627\u0645\u06cc\u062c \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u0679\u0648 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u067e\u0631 \u0622\u0632\u0645\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0633 \u0645\u06cc\u06ba \u0634\u06cc\u0679 \u06a9\u0627 \u0631\u0646\u06af\u060c \u06c1\u06cc\u0646\u0688 \u0631\u0627\u0626\u0679\u0646\u06af \u0641\u0648\u0646\u0679\u0633\u060c \u0627\u06cc\u06a9 \u067e\u06cc \u0688\u06cc \u0627\u06cc\u0641 \u0641\u06cc \u0641\u0631\u06cc\u0645\u060c \u067e\u06cc \u0627\u06cc\u0646 \u062c\u06cc \u0627\u06cc\u06a9\u0633\u067e\u0648\u0631\u0679\u060c \u0627\u0648\u0631 \u0628\u06c1\u062a \u06a9\u0686\u06be \u0633\u0645\u06cc\u062a \u0645\u0632\u06cc\u062f \u0627\u062e\u062a\u06cc\u0627\u0631\u0627\u062a \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u06a9\u0648\u0626\u06cc \u0648\u06cc\u0688\u06cc\u0648 \u0634\u0648\u0679 \u06a9\u0631\u06d2\u060c \u06a9\u0645\u0631\u0634\u0644 \u0634\u0648\u0679 \u06a9\u0631\u06d2\u060c \u06cc\u0627 \u06a9\u0633\u06cc \u06a9\u0627\u0645\u06a9 \u06a9\u0627 \u0622\u062e\u0631\u06cc \u0635\u0641\u062d\u06c1 \u06a9\u06be\u06cc\u0646\u0686\u06d2\u060c \u06a9\u0648\u0626\u06cc \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u0679\u0648\u0631\u06cc \u0628\u0648\u0631\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0645\u0646\u0635\u0648\u0628\u06c1 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u062a\u0635\u0648\u06cc\u0631\u060c \u062a\u0631\u062a\u06cc\u0628 \u0633\u06d2 \u06a9\u06be\u06cc\u0646\u0686\u06cc \u06af\u0626\u06cc\u060c \u0645\u062e\u062a\u0635\u0631 \u0646\u0648\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06cc\u06c1 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":32401,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32400","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/32400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=32400"}],"version-history":[{"count":1,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/32400\/revisions"}],"predecessor-version":[{"id":32402,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/32400\/revisions\/32402"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media\/32401"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=32400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=32400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=32400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}