humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
лог изменений
get_info
get_info($path,$name); - получить инфорацию с заданным атрибутом (Доступна с версии 7.0.56)Функция на вход принимает параметры:
- "title" - заголовок
- "subject" - тема
- "author" - автор
- "producer" - продюсер
- "creator" - создатель
- "creation_date" - дата создания
- "modification_date" - дата изменения
- "keywords" - ключевые слова
- "pages" - страницы
- "count" - число атрибутов
- "is_readonly" - только для чтения
После отработки функция возвращает результат своей работы в скрипт :
Пример использования
<?php // Scenario: Get various information about a PDF file including metadata, page count, and properties $xhe_host = "localhost:7010"; // Connect functional objects if not already connected if (!isset($path)){ $path = "../../../Templates/init.php"; require($path); } // info echo "\n<span >pdffile->" . basename (__FILE__) . "</span>\n"; // Input data $filePath = "test/test.pdf"; // Example 1: Get PDF title echo("\n\nExample 1. Get PDF title: "); $title = SYSTEM::$pdffile->get_info($filePath, "title"); echo($title); // Example 2: Get PDF subject echo("\n\nExample 2. Get PDF subject: "); $subject = SYSTEM::$pdffile->get_info($filePath, "subject"); echo($subject); // Example 3: Get PDF author echo("\n\nExample 3. Get PDF author: "); $author = SYSTEM::$pdffile->get_info($filePath, "author"); echo($author); // Example 4: Get PDF producer echo("\n\nExample 4. Get PDF producer: "); $producer = SYSTEM::$pdffile->get_info($filePath, "producer"); echo($producer); // Example 5: Get PDF creator echo("\n\nExample 5. Get PDF creator: "); $creator = SYSTEM::$pdffile->get_info($filePath, "creator"); echo($creator); // Example 6: Get PDF creation date echo("\n\nExample 6. Get PDF creation date: "); $creationDate = SYSTEM::$pdffile->get_info($filePath, "creation_date"); echo($creationDate); // Example 7: Get PDF modification date echo("\n\nExample 7. Get PDF modification date: "); $modificationDate = SYSTEM::$pdffile->get_info($filePath, "modification_date"); echo($modificationDate); // Example 8: Get PDF keywords echo("\n\nExample 8. Get PDF keywords: "); $keywords = SYSTEM::$pdffile->get_info($filePath, "keywords"); echo($keywords); // Example 9: Get PDF pages count echo("\n\nExample 9. Get PDF pages count: "); $pages = SYSTEM::$pdffile->get_info($filePath, "pages"); echo($pages); // Example 10: Get number of additional info keys echo("\n\nExample 10. Get number of additional info keys: "); $count = SYSTEM::$pdffile->get_info($filePath, "count"); echo($count); // Example 11: Check if PDF is readonly echo("\n\nExample 11. Check if PDF is readonly: "); $isReadonly = SYSTEM::$pdffile->get_info($filePath, "is_readonly"); echo($isReadonly); // Quit the application WINDOW::$app->quit(); ?>
# 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()
#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 = "localhost:7010"; 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("\n\n"); app.quit(); } }
// подключим функциональные объекты, если еще не подключен xhe_host="127.0.0.1:7013"; echo=require("../../../Templates JS/init.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("\n"); // Quit app.quit();
=============================================
pdffile Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.