Text variables in PL

Here everybody can post his problems with PhotoLine
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Text variables in PL

Beitrag von maho »

Hi guys,

I've got an unusual task I am hoping I can do in PhotoLine.

Let's suppose I have a PLD document that contains a text layer. The text layer looks like this:
Congratulations {{Name}}! You have been a PhotoLine {{Role}} for {{NumYears}} Years!
Outside of PhotoLine, I have a .CSV file that has entries like this:
Name,Role,NumYears
Martin,developer,28
Gerhard,developer,27
maho,user,21
What I would like to do is to produce one new Page in the document for each row in the .CSV file, that has the variables {{Name}}, {{Role}}, {{NumYears}} replaced with the values in the .CSV.

Is there some way of doing this?

This type of functionality is commonly seen on various online label makers (eg https://www.avery.com/).

Any help greatly appreciated!
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4276
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: Text variables in PL

Beitrag von Gerhard Huber »

"Layout > Text > Serial Document..." can do this.
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: Text variables in PL

Beitrag von maho »

Thank you for your quick reply - I will try that and see how it works.
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: Text variables in PL

Beitrag von maho »

It worked first time - a very powerful feature!
PPaul
Mitglied
Beiträge: 37
Registriert: Di 28 Jun 2022 17:37

Re: Text variables in PL

Beitrag von PPaul »

Indeed it is powerful, I use it often.
- Paul
Benutzeravatar
Herbert123
Mitglied
Beiträge: 2452
Registriert: Sa 12 Mai 2012 21:38

Re: Text variables in PL

Beitrag von Herbert123 »

Gerhard Huber hat geschrieben: Mi 29 Mai 2024 15:54 "Layout > Text > Serial Document..." can do this.
I was wondering: is it possible to link a placeholder layer to a data field that contains an image file name and have it place images from a preset folder?
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait
Martin Huber
Entwickler
Entwickler
Beiträge: 4298
Registriert: Di 19 Nov 2002 15:49

Re: Text variables in PL

Beitrag von Martin Huber »

Herbert123 hat geschrieben: Di 04 Jun 2024 22:22 I was wondering: is it possible to link a placeholder layer to a data field that contains an image file name and have it place images from a preset folder?
No, currently there is no way to do that.
Vivi_Ram
Mitglied
Beiträge: 392
Registriert: Sa 28 Sep 2024 17:04

Data Merge & Autoflow for images

Beitrag von Vivi_Ram »

I was looking for this feature. Found it! Thanks @maho for starting this thread

@Martin: It would quite good if we can do a data merge for placeholder image layers too from a specified folder. I use this often (daily!). For reference, if you have Affinity Publisher, look at their simple but effective Data Merge function and auto flow. Both of which are huge time savers! Thank you!
Benutzeravatar
Hoogo
Beta Tester
Beiträge: 4169
Registriert: So 03 Jul 2005 13:35
Wohnort: Deutschland

Re: Text variables in PL

Beitrag von Hoogo »

There is also something special to create bar codes from text files, maybe QR only... But I'd have to search for that function, something with {}
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Vivi_Ram
Mitglied
Beiträge: 392
Registriert: Sa 28 Sep 2024 17:04

Re: Text variables in PL

Beitrag von Vivi_Ram »

@Hoogo: If you find out, kindly post here. I'd appreciate it very much. Thank you!
Benutzeravatar
Gerhard Huber
Entwickler
Entwickler
Beiträge: 4276
Registriert: Mo 18 Nov 2002 15:30
Wohnort: Bad Gögging

Re: Text variables in PL

Beitrag von Gerhard Huber »

There is some documentation in 7.4.89 Barcode
Benutzeravatar
Hoogo
Beta Tester
Beiträge: 4169
Registriert: So 03 Jul 2005 13:35
Wohnort: Deutschland

Re: Text variables in PL

Beitrag von Hoogo »

Gerhard Huber hat geschrieben: Mo 13 Jan 2025 17:24There is some documentation in 7.4.89 Barcode
I see, it's missing in the English help. Google translated that missing part to this:

With {pf} as code, the function opens the file dialog. A CSV or xlsx file can be loaded here. The first column is used to create a multi-page document with the content of this column as a QR code.

It is also possible to create a multi-page document with a consecutive number. To do this, select e.g. {p:13}More{##}or{#3}. Here 13 indicates an offset. A QR code is now created on each page of the document with the page number plus offset at the "#" position.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
Vivi_Ram
Mitglied
Beiträge: 392
Registriert: Sa 28 Sep 2024 17:04

Re: Text variables in PL

Beitrag von Vivi_Ram »

Great. Thanks!!
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: Text variables in PL

Beitrag von maho »

This feature no longer seems to work.

I have a single page .PLD document, with a single text variable. I have a .CSV file with the values to replace. When I try Layout > Text > Serial Document, it successfully parses the .CSV file to read Data Sets and Data Fields. When I click Create Serial Document, PL creates a new file with the appropriate number of pages; however, the text variable was NOT updated with the appropriate values.
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: Text variables in PL

Beitrag von maho »

It does work... note to future self, or anyone else who stumbles by:

In the .CSV file, each variable must have double quotes around it, like this:
"Name","Role","NumYears"
not as
Name,Role,NumYears

In the .PLD document, each variable should be written in the Text layer exactly as, without any delimiters, eg:
Name Role NumYears
not as
{{Name}} {{Role}} {{NumYears}}