Update pdf metadata from XML? XMP Inject?

Post Reply
automation
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 10:19 pm

Update pdf metadata from XML? XMP Inject?

Post by automation » Mon Oct 07, 2019 11:32 am

I can pickup data from an XML and now I want to add that data as metadata to a pdf-file in the same job.

How can I do that? I have tested XML Pickup and write to the pdf fil XMP Inject but can't see where I define where I want the metadata in pdf and get an error.

cedric.sintes
Newbie
Posts: 5
Joined: Fri Feb 15, 2013 4:38 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by cedric.sintes » Mon Oct 07, 2019 11:39 am

Hello,

There is 3 steps to inject XMP data into a PDF :
1-Add a XMP template as dataset
2-Use Inject XMP with created dataset
3-Update XMP with some rules (put some metadata variable to XML variable for exemple)

Here a sample ...
Injection XMP.sflow.zip
(30.61 KiB) Downloaded 13 times
Have a good day ;)

automation
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 10:19 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by automation » Fri Oct 11, 2019 1:53 pm

Thanks for your flow. I have tested many times but can't get it to work if I drop one XML and one pdf and insert the data from the XML as metadata in the pdf.

It works fine if I only drop a pdf and set static values in XMP update.

How can get it to work with pdf and XML and pick the values from the XML with "define single line text with variables". I have tested to add a XML-pickup before I use the XMP pickup.
cedric.sintes wrote:
Mon Oct 07, 2019 11:39 am
Hello,

There is 3 steps to inject XMP data into a PDF :
1-Add a XMP template as dataset
2-Use Inject XMP with created dataset
3-Update XMP with some rules (put some metadata variable to XML variable for exemple)

Here a sample ...
Injection XMP.sflow.zip

Have a good day ;)

cedric.sintes
Newbie
Posts: 5
Joined: Fri Feb 15, 2013 4:38 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by cedric.sintes » Fri Oct 11, 2019 2:38 pm

Can you send me your flow and a sample of PDF and XML ?

automation
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 10:19 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by automation » Fri Oct 11, 2019 4:15 pm

cedric.sintes wrote:
Fri Oct 11, 2019 2:38 pm
Can you send me your flow and a sample of PDF and XML ?
Hi!

I have addad a .zip with the flow.

I put test.pdf and 150307.xml in "PDF + XML IN".

template.xmp is the template I use.

error.png is an error I get in the log.

I get an empty metatag "test" in the pdf that contains width and Height. But I don't get the values from the XML "PrintWidthTextColor" (185) and "PrintHeightTextColor" (200). But I can see the XML value as a sample value in "Update XMP" when I select "New value".
Attachments
Flow.zip
(67.8 KiB) Downloaded 2 times

cedric.sintes
Newbie
Posts: 5
Joined: Fri Feb 15, 2013 4:38 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by cedric.sintes » Fri Oct 11, 2019 4:40 pm

I see 8-) ...
You have first to combine PDF and XML with XML Pickup.
Capture d’écran 2019-10-11 à 16.28.24.png
Capture d’écran 2019-10-11 à 16.28.24.png (22.32 KiB) Viewed 89 times
The simple way is to add 2 files with same name (150307.pdf and 150307.xml) so XML Pickup setup is "Metadata alongside asset".
OR
you can also add a folder with the 2 files (not with same name), XML Pickup setup is "Metadata in job folder asset"
the result will be a job folder with dataset so you have to ungroup, and sort to use only the pdf file.
You can find more details here : https://www.enfocus.com/manuals/UserGui ... ickup.html

There is also something strange into the XMP update : XMP path was not good. I fix it into the new flow.
The better way to setup is to put a pdf and xml file into the flow and stop it before the XMP update. So you can work directly into sample file.
This is the result into the PDF :
Capture d’écran 2019-10-11 à 16.28.14.png
Capture d’écran 2019-10-11 à 16.28.14.png (61.99 KiB) Viewed 89 times
Tadaaaaa :lol:
Attachments
Archive.zip
(28.55 KiB) Downloaded 6 times

automation
Newbie
Posts: 12
Joined: Tue Jan 15, 2019 10:19 pm

Re: Update pdf metadata from XML? XMP Inject?

Post by automation » Tue Oct 15, 2019 10:12 am

You are awesome! Thanks, it works!
cedric.sintes wrote:
Fri Oct 11, 2019 4:40 pm
I see 8-) ...
You have first to combine PDF and XML with XML Pickup.
Capture d’écran 2019-10-11 à 16.28.24.png
The simple way is to add 2 files with same name (150307.pdf and 150307.xml) so XML Pickup setup is "Metadata alongside asset".
OR
you can also add a folder with the 2 files (not with same name), XML Pickup setup is "Metadata in job folder asset"
the result will be a job folder with dataset so you have to ungroup, and sort to use only the pdf file.
You can find more details here : https://www.enfocus.com/manuals/UserGui ... ickup.html

There is also something strange into the XMP update : XMP path was not good. I fix it into the new flow.
The better way to setup is to put a pdf and xml file into the flow and stop it before the XMP update. So you can work directly into sample file.
This is the result into the PDF :
Capture d’écran 2019-10-11 à 16.28.14.png

Tadaaaaa :lol:

Post Reply