System / pdffile
get_info
get_info($path,$name); - получить инфорацию с заданным атрибутом (Доступна с версии 7.0.56)Функция на вход принимает параметры:
- "title" - заголовок
- "subject" - тема
- "author" - автор
- "producer" - продюсер
- "creator" - создатель
- "creation_date" - дата создания
- "modification_date" - дата изменения
- "keywords" - ключевые слова
- "pages" - страницы
- "count" - число атрибутов
- "is_readonly" - только для чтения
После отработки функция возвращает результат своей работы в скрипт :
Пример использования (PHP):
===============================================================
<?php $xhe_host = "127.0.0.1:7013"; // подключим объект для управления эмулятором, если еще не подключен if (!isset($path)) $path="../../../Templates/xweb_human_emulator.php"; require($path); // начало echo "<hr><font color=blue>textfile->".basename (__FILE__)."</font><hr>"; // 1 echo("\n1. Получим заголовок : "); echo($pdffile->get_info("test\\test.pdf","title")); // 2 echo("\n2. Получим тему : "); echo($pdffile->get_info("test\\test.pdf","subject")); // 3 echo("\n\n3. Получим author : "); echo($pdffile->get_info("test\\test.pdf","author")); // 4 echo("\n4. Получим producer : "); echo($pdffile->get_info("test\\test.pdf","producer")); // 5 echo("\n5. Получим creator : "); echo($pdffile->get_info("test\\test.pdf","creator")); // 6 echo("\n\n6. Получим creation_date : "); echo($pdffile->get_info("test\\test.pdf","creation_date")); // 7 echo("\n7. Получим modification_date : "); echo($pdffile->get_info("test\\test.pdf","modification_date")); // 8 echo("\n\n8. Получим keywords : "); echo($pdffile->get_info("test\\test.pdf","keywords")); // 9 echo("\n9. Получим pages : "); echo($pdffile->get_info("test\\test.pdf","pages")); // 10 echo("\n10. Получим число добавочных ключей с информацией : "); echo($pdffile->get_info("test\\test.pdf","count")); // 11 echo("\n11. Получим is_readonly : "); echo($pdffile->get_info("test\\test.pdf","is_readonly")); // конец echo "<hr><br>"; // Quit $app->quit(); ?>
Пример использования (Python):
===============================================================
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7013" from xweb_human_emulator import * # начало echo("<hr><font color=blue>sound.xxxxxxxxx</font><hr>") # 1 echo("\n1. Получим заголовок : "); echo(pdffile.get_info("test\\test.pdf","title")); # 2 echo("\n2. Получим тему : "); echo(pdffile.get_info("test\\test.pdf","subject")); # 3 echo("\n\n3. Получим author : "); echo(pdffile.get_info("test\\test.pdf","author")); # 4 echo("\n4. Получим producer : "); echo(pdffile.get_info("test\\test.pdf","producer")); # 5 echo("\n5. Получим creator : "); echo(pdffile.get_info("test\\test.pdf","creator")); # 6 echo("\n\n6. Получим creation_date : "); echo(pdffile.get_info("test\\test.pdf","creation_date")); # 7 echo("\n7. Получим modification_date : "); echo(pdffile.get_info("test\\test.pdf","modification_date")); # 8 echo("\n\n8. Получим keywords : "); echo(pdffile.get_info("test\\test.pdf","keywords")); # 9 echo("\n9. Получим pages : "); echo(pdffile.get_info("test\\test.pdf","pages")); # 10 echo("\n10. Получим число добавочных ключей с информацией : "); echo(pdffile.get_info("test\\test.pdf","count")); # 11 echo("\n11. Получим is_readonly : "); echo(pdffile.get_info("test\\test.pdf","is_readonly")); # конец echo("<hr><br>") # Quit app.quit()
Пример использования (C#):
===============================================================
#region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program:XHEScript { static void Main(string[] args) { // init XHE server="127.0.0.1:7013"; InitXHE(); // начало echo("<hr><font color=blue>pdffile.get_info</font><hr>"); // 1 echo("\n1. Получим заголовок : "); echo(pdffile.get_info("test\\test.pdf","title")); // 2 echo("\n2. Получим тему : "); echo(pdffile.get_info("test\\test.pdf","subject")); // 3 echo("\n\n3. Получим author : "); echo(pdffile.get_info("test\\test.pdf","author")); // 4 echo("\n4. Получим producer : "); echo(pdffile.get_info("test\\test.pdf","producer")); // 5 echo("\n5. Получим creator : "); echo(pdffile.get_info("test\\test.pdf","creator")); // 6 echo("\n\n6. Получим creation_date : "); echo(pdffile.get_info("test\\test.pdf","creation_date")); // 7 echo("\n7. Получим modification_date : "); echo(pdffile.get_info("test\\test.pdf","modification_date")); // 8 echo("\n\n8. Получим keywords : "); echo(pdffile.get_info("test\\test.pdf","keywords")); // 9 echo("\n9. Получим pages : "); echo(pdffile.get_info("test\\test.pdf","pages")); // 10 echo("\n10. Получим число добавочных ключей с информацией : "); echo(pdffile.get_info("test\\test.pdf","count")); // 11 echo("\n11. Получим is_readonly : "); echo(pdffile.get_info("test\\test.pdf","is_readonly")); // конец echo("<hr><br>"); app.quit(); } }
Пример использования (JS):
===============================================================
// подключим объект для управления эмулятором, если еще не подключен xhe_host="127.0.0.1:7013"; echo=require("../../../Templates JS/xweb_human_emulator.js"); // начало echo("<hr><font color=blue>sound.beep</font><hr>"); // 1 шаг echo("1. Пикнуть : "); echo(sound.beep()); // 1 echo("\n1. Получим заголовок : "); echo(pdffile.get_info("test\\test.pdf","title")); // 2 echo("\n2. Получим тему : "); echo(pdffile.get_info("test\\test.pdf","subject")); // 3 echo("\n\n3. Получим author : "); echo(pdffile.get_info("test\\test.pdf","author")); // 4 echo("\n4. Получим producer : "); echo(pdffile.get_info("test\\test.pdf","producer")); // 5 echo("\n5. Получим creator : "); echo(pdffile.get_info("test\\test.pdf","creator")); // 6 echo("\n\n6. Получим creation_date : "); echo(pdffile.get_info("test\\test.pdf","creation_date")); // 7 echo("\n7. Получим modification_date : "); echo(pdffile.get_info("test\\test.pdf","modification_date")); // 8 echo("\n\n8. Получим keywords : "); echo(pdffile.get_info("test\\test.pdf","keywords")); // 9 echo("\n9. Получим pages : "); echo(pdffile.get_info("test\\test.pdf","pages")); // 10 echo("\n10. Получим число добавочных ключей с информацией : "); echo(pdffile.get_info("test\\test.pdf","count")); // 11 echo("\n11. Получим is_readonly : "); echo(pdffile.get_info("test\\test.pdf","is_readonly")); // конец echo("<hr><br>"); // Quit app.quit();
=============================================
pdffile Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.