IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#24556 - 08/26/08 07:49 PM Large Amount of variable images
jadez03 Offline
Junior Member

Registered: 08/26/08
Posts: 7
Loc: Anchorage, AK
We are having an issue in our shop with a perspective job for a photographer, who would need 4 unique images per sheet on a job that will entail hundreds of thousands of records.

We have been trying to work out a way to do what we need in print shop mail, but have been unable to figure it out.

I've written up a bit of pseudocode on what we would need...

Code:
  
------Declare recnum as integer, 0
[loop]
--recnum[+1]
--place 'recnum'.jpg, 'recnum'-a.jpg, 'recnum'-b.jpg, 'recnum'-c.jpg
[/loop]
Sorry for being so confusing. What we basically would need is a function that would have a variable that goes up in increments, and can place images in the document that match the variable name and count. So record 1 gets the photos named 1.jpg, 1-a.jpg, 1-b.jpg, and 1-c.jpg.

This way we can accept the photos from the client and print them on forms making sure that the correct photos go only to the correct recipients.

Thank you in advance for your help,
-Brandon

Top
#24557 - 08/26/08 07:56 PM Re: Large Amount of variable images
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
jadez03,

If I understand correctly, you don't have a database with file names already, correct?

In this case, you could always create 4 different image objects on the screen, and edit their expressions to be something like this:

Image1:
STR(RECORD_NR()) & ".jpg"

Image2:
STR(RECORD_NR()) & "-a.jpg"

Image3:
STR(RECORD_NR()) & "-b.jpg"

Image4:
STR(RECORD_NR()) & "-c.jpg"

So the first record would have 1.jpg, 1-a.jpg, 1-b.jpg and 1-c.jpg. Record 2 would have 2.jpg, 2-a.jpg, 2-b.jpg and 2-c.jpg, and so on for the other records after that.

Hope this helps.

Regards,
Rapha

Top
#24558 - 08/27/08 12:45 PM Re: Large Amount of variable images
jadez03 Offline
Junior Member

Registered: 08/26/08
Posts: 7
Loc: Anchorage, AK
Beautiful!

Soon we will be getting a list in CSV (database) form, so how would I have that code incorporate a # from a certain field in this database? Replace RECORD_NR with @variable@?

Top
#24559 - 08/27/08 12:50 PM Re: Large Amount of variable images
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4956
Loc: Objectif Lune Montreal
Field names have to be put between square brackets. Since they are strings by default, you probably won't need the STR function(although you might if it considers it number).

It would looks like this:

Image1:
[FieldName] & ".jpg"

Image2:
[FieldName] & "-a.jpg"

Image3:
[FieldName] & "-b.jpg"

Image4:
[FieldName] & "-c.jpg"

If the field turns out to be number, then just use the STR function: STR([FieldName]) & ".jpg"

Regards,
Rapha

Top
#24560 - 08/27/08 12:53 PM Re: Large Amount of variable images
jadez03 Offline
Junior Member

Registered: 08/26/08
Posts: 7
Loc: Anchorage, AK
Thank you kindly for the quick response! You have saved the day here, sir! I wish I could repay the favor smile

Top