get_info

get_info(path, name)

Данная команда позволяет получить информацию с заданным атрибутом.

Команда на вход принимает параметры:
  • path – путь к pdf файлу
  • name – имя атрибута который надо получить, например:
    • title – заголовок
    • subject – тема
    • author – автор
    • producer – продюсер
    • creator – создатель
    • creation_date – дата создания
    • modification_date – дата изменения
    • keywords – ключевые слова
    • pages – страницы
    • count – число атрибутов
    • is_readonly – только для чтения
После отработки команда возвращает результат своей работы в робот:
  • информация - информация, по заданному атрибуту (type: string)



Примеры использования (php)

<?php $xhe_host = "127.0.0.1:5006";
 
// подключим функциональные объекты, если еще не подключен
if (!isset($path))
  $path="../../../Templates/init.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();
?>

Примеры использования (cs)

#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/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("<hr><br>");
 
// Quit
app.quit();

Примеры использования (py)

# 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()