Jump to content

Embedding MetaData in a FusionPro PDF


EricC

Recommended Posts

Is there a way to embed Metadata in the PDF file, when it is being composed on the FusionPro server? (this is for a printable hosted printOne store)

 

It needs to be variable.

 

So for example, if the location in Atlanta orders a versioned item (such as a booklet or a brochure), the word 'Atlanta' needs to be added to the PDF metadata.

 

If the location in San Diego places an order, then 'San Diego' needs to be added to the PDF metadata, etc ...

 

Is this possible?

Link to comment
Share on other sites

Metadata can be embedded in VDX output. From the Input Options dialog (from the menu in Acrobat, FusionPro > Data Definition > Input Options), click "Edit Fields", then you can edit any field and there is a "Use as VDX metadata" check box.

 

I'm not sure exactly how you would want metadata embedded into regular PDF output. I would need to know more about how the metadata is intended to be used to even be able to investigate how to add it.

 

You can add keywords to the PDF output using the "Doc Info" tab on the Composition Settings dialog, but I don't think there's a way to change that programatically at composition time without access to the CFG file settings in FusionPro Server.

 

You can also create an external XML metadata file with a composition (to any output format) with the FusionPro.Composition.CreateXMLLogFile and FusionPro.Composition.LogXMLMetadata JavaScript functions, although this is mainly used with statement-type jobs.

Link to comment
Share on other sites

  • 5 years later...

We have a customer that we do a lot of variable data jobs for and they have made a request:

We need a PDF and corresponding metadata file for each of the letters that’s sent out on Company’s behalf. The PDF needs to be a vector base file (which means that the PDF file is not an image and the text is searchable within the PDF). The metadata files need to be comma delimited. We also need for the documents to follow the naming convention provided as the examples. Below is a list of all the metadata fields expected. In most cases all of the metadata will not be present however, the metadata files need to have the place holders for each metadata field.

 

I have made an attempt of doing what you have stated in the original post but am not getting any results. I have included a test doc that I threw together. What would the OnJobStart rule using FusionPro.Composition.CreateXMLLogFile look like? And what would the OnRecordStart rule using FusionPro.Composition.LogXMLMetadata look like?

 

Windows 7

FP 9.1.0

Acrobat XI

Meta data test.zip

Link to comment
Share on other sites

The PDF needs to be a vector base file (which means that the PDF file is not an image and the text is searchable within the PDF).

Okay, that's what FusionPro outputs, by default: a file with actual text in it. If you output to PDF, it's generally searchable, although if you want to split hairs, FusionPro doesn't necessarily place anything like search hints in the PDF output, so that, for instance, text which is hyphenated across lines can be found with a search for the whole word. It also doesn't provide any reading order hints. But the text that's output is actually text.

The metadata files need to be comma delimited

Sorry, but there is no mechanism in FusionPro to output a data file in an arbitrary format. You can get output intended for printing in one of 12 formats, and you can get JPEGs for web previews, and you can even get EPS with fonts outlined. And you can get an XML log file. But you can't get a comma-delimited file of metadata.

The metadata files need to be comma delimited. We also need for the documents to follow the naming convention provided as the examples. Below is a list of all the metadata fields expected. In most cases all of the metadata will not be present however, the metadata files need to have the place holders for each metadata field.
Something like that is often a feature of a workflow where a larger application, generally a web app, pulls data from a database and feeds it to FusionPro VDP Producer API (FP Server), and also generates any other output it needs in parallel with FusionPro.

I have made an attempt of doing what you have stated in the original post but am not getting any results. I have included a test doc that I threw together. What would the OnJobStart rule using FusionPro.Composition.CreateXMLLogFile look like?

Like this:

FusionPro.Composition.CreateXMLLogFile();

That will give you an XML file with the same name as your main composition log file, with the extension ".xml" appended. If you want a different file, just specify it in the call, like so:

FusionPro.Composition.CreateXMLLogFile("MyXMLLogFileName.xml");

Note however that, even if you don't specify a file name, you still need the parentheses, as it's a function call.

And what would the OnRecordStart rule using FusionPro.Composition.LogXMLMetadata look like?

Something like this:

FusionPro.Composition.LogXMLMetadata("First Name", Field("First Name"));
FusionPro.Composition.LogXMLMetadata("Middle Name", Field("Middle Name"));
FusionPro.Composition.LogXMLMetadata("Last Name", Field("Last Name"));
//...

Or, you can use this trick to log all your fields:

for (var fieldName in FusionPro.Fields)
   FusionPro.Composition.LogXMLMetadata(fieldName, Field(fieldName));

You can also log anything you want, not just field values. For instance, you could log the result of a rule, or some other calculation or function.

 

Finally, don't be afraid to use the Building Blocks dialog. It's got all kinds of handy information. If you go to the Objects tab, and drill down through FusionPro (Global), Composition, XML Metadata, you can see descriptions for both functions, and if you click Insert, it will give you the parameters as well.

Link to comment
Share on other sites

×
×
  • Create New...