PHP.mk документација

fdf_create

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

function.fdf-create.php PHP.net прокси Преводот се освежува
Оригинал на PHP.net
Патека function.fdf-create.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + превод во позадина Кодовите, табелите и белешките остануваат читливи во истиот тек.
fdf_create

Референца за `function.fdf-create.php` со подобрена типографија и навигација.

function.fdf-create.php

fdf_create

(PHP 4, PHP 5 < 5.3.0, PECL fdf SVN)

fdf_createКреирај нов FDF документ

= NULL

fdf_create(): resource

Креира нов FDF документ.

Оваа функција е потребна ако сакате да пополните полиња за внесување во PDF документ со податоци.

Параметри

Оваа функција нема параметри.

Вратени вредности

Враќа FDF документ рачка, или false при грешка.

Примери

Пример #1 Пополнување PDF документ

<?php
$outfdf
= fdf_create();
fdf_set_value($outfdf, "volume", $volume, 0);

fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf");
fdf_save($outfdf, "outtest.fdf");
fdf_close($outfdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("outtest.fdf", "r");
fpassthru($fp);
unlink("outtest.fdf");
?>

Види Исто така

  • fdf_close() Ако е обезбедено, резултантниот FDF ќе биде запишан во овој параметар. Во спротивно, оваа функција ќе го запише FDF во стандардниот PHP излезен стрим.
  • fdf_save() - Зачувување FDF документ
  • fdf_open() - Отвори FDF документ

Белешки од корисници 4 белешки

jwadhwani на pobox точка com
19 години пред
For fdf_save you need to provide the complete path, such as :fdf_save($outfdf,"c:/inetpub/wwwroot/temp_sites/fdf/outtest.fdf"); and not only outtest.fdf.
Панкот е мртов
пред 22 години
<?php
$outfdf = fdf_create();
$volume = "test";
fdf_set_value($outfdf, "volume", $volume, 0);

fdf_set_file($outfdf, "http://localhost/webapps/volume.pdf");
Header("Content-type: application/vnd.fdf");
fdf_save($outfdf);
fdf_close($outfdf);

?>

This works for IE 5.5+  

It will populate the fields and open the resulting pdf for you, without having to create an fdf file and adding the open script to the pdf...
Сергеј
пред 23 години
I thought the following might save someone a lot of time. The example fdf snippet above, namely:

<?php
$outfdf = fdf_create();
fdf_set_value($outfdf, "volume", $volume, 0);

fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf");
fdf_save($outfdf, "outtest.fdf");
fdf_close($outfdf);
Header("Content-type: application/vnd.fdf");
$fp = fopen("outtest.fdf", "r");
fpassthru($fp);
unlink("outtest.fdf");
?>

will not work (or there's at least a big possibility it won't) in IE (version 6 sure and I suspect lower versions as well) if you have session.auto_start on. Apparently, setting a cookie before feeding the fdf to the browser somehow messes it up. It works fine in Netscape though. I spent days on Google before I found a post somewhere about someone else having the same problem. 

The solution? Well, I created a separate directory in the web tree and turned session.auto_start off just for that directory like this:

<Location /new_directory>
    php_admin_flag session.auto_start 0
</Location>

Hope this was useful to somebody.
mlarke на nanuc точка ca
пред 22 години
Header("Content-type: application/vnd.fdf"); simply does not work in IE. The easiest method to automatically load the fdf file is to open the 'pdf' file via php. With use of Acrobat 
document -> page action -> page open -> add -> javascript
and paste the following into the pdf file:

this.importAnFDF("my_fdf_file.fdf");

This will auto-load the fdf contents
Cheers Mike
На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.