GetEmbeddedTextFile(path, id, [encoding]) Last updated: 22. Jun 2023
Get the size of an embedded file (image or file upload) in a specific document.
Parameters
Name | Type | Description |
---|---|---|
path | string | Absolute path of Docly document to get embedded file size from. |
id | string | ID of embedded file to get size from. |
encoding (optional) | string | Text encoding, default is UTF8. |
Returns
Number, file size in bytes.
Example
Code example (#JS)
#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.#{
// Getting the embedded text file from a Docly document
let p = docly.getFile("Test files/Example file.xlsx");
let fileId = p.File;
let text = docly.getEmbeddedTextFile(p.Url, fileID);
// Write embedded text file contents to output
write(text);
}#
Output
The #JS code above produces the output shown below:PK Y��U _rels/.rels���J1��}��{w�Dd���ЛH}����a7�0u}{�Z���I~��7C��f���G�Fo�Z+���{�����kW�#�VJ$cʪ��l� �n�0�\Q�X^:�`���d�d{�m]_�d������h���V�������F�w�^F9��W��-�(F/3�O�DSU�N�l/w�{N(�[���q��T����u<��r�?焮�s9�F����M��h���'h? PKf���� ; PK Y��U xl/workbook.xml�S�n�0��+�m-^j�W�� ��ə�Fk�����e�)�C�8�yZޜk��X�U��a�<P�.�����c:�1�"W�ZA�.`������>�z��}ecV!6߷y5�C݀�H�M͑L��mc���Z�QL���:���]�"���5(�@H���V��l�,����!�7�g^�˜��W�_���|hRʎYɥj�ҧ/�wȑ:�R2���<�)@h�L*C���$�d�[�!�i#^�B.���R���Z�����ٶ�z���g�
}�����|r�gQ`E��f��wbWa�f�<b��T�&]+���8N���5������z�
tm�aK�<��u*A
��$�f!(`���� �lN���}PD l(?��&�k�u5W{9QA���?Zt߫����_Z�"3Щ� �y#b���4�&�i4���h������x2HoӔƖl�y��D�P�$}����(�Z���Q�)�{;f~���/PK��~� l PK Y��U
xl/styles.xml�X]O�0}߯��>��R`J�S��LhiҴ�8��?"ۅ�_��8M>�T&�H�Cm��s|r|�8��VR�;f,�j�GFL�:㪘����� F�Q�Q���Y|�|����*s���ҹ�!6-���@WL��\IMAleͬIA�Q4%�r��X-�\:�R�Tdt!�o��݅�@�W����$&-A�Zmx&8��>�;*�$��J����J.�7��<�x�xS��)cI\Q�Qs����+pV�R�&����z4>����&���/k���B+*��Ω�w�/�^��I,X�������$�i �5�O��L�2!�|���7w�*ZW�@�{�m70�ZU��kO�̒���M� t.x�${�xi�c�k�&��t��Jm�P�,ڲ�O�����ȱ���
,����j��D��fb�fK���B�ywl�:H���ek�%� ��$���S�ƧѶ>�:���Z���3ދyA����^�^�^�^�^�6b&������vJ�d�ԌwI��C���������Ư���z�(�����bۿ[�w�i��Y��������wR!z��,�p\�y
��R�u��h 8|�~E�;�t �>Z�TZw��f�7�`����9�%3)�A9@��L��_僳������Ղg�D���Bd��7�7�f�ts@�P���lβ�?PK�؟.� PK Y��U xl/worksheets/sheet1.xml�VKo�8��t�ik��We���.��A�n�����"B�*I�M~��g�`�!98������P3?�ʸw��K2��XR&K������iC%\
X�O����o�I�G��^��1�U�8����A�'�*#_�!йBݢ����,�~�p�ނ!��Ű�q��0%�N��)�u���� �*rB�5��u�i�&�^�b%�L�(�YEm��2�|�3��B,#��?"p����3��8�Q��0n@}���}99�����̓�GC��0�G!e�B[vOA���'W���p38�γ�Sy� ��]�9㟊�[&