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
#39259 - 04/19/12 06:26 AM Unique Check boxes using PDF Marks
Tyran van Zyl
Unregistered


Hi All

I know PDF Marks are not officially supported hence me asking this on the forum.

I am creating a PP Design document which requires many unique check boxes.

I am able to create 1 unique check box using the following PressTalk

Code:
passthrough('[ /_objdef {afields1} /type /array /OBJ pdfmark')
passthrough('[ /_objdef {aform1} /type /dict /OBJ pdfmark')
passthrough('[ {aform1} << /Fields {afields1}')
passthrough('/DR << /Font << >> >>')
passthrough('/DA (/Helv 12 Tf 1 g )')
passthrough('/NeedAppearances true >> /PUT pdfmark')
passthrough('[ {Catalog} << /AcroForm {aform1} >> /PUT pdfmark')
passthrough('[ /Subtype /Widget/Rect [ 0 0 13 13 ]')
passthrough('/T (Checkbox)')
passthrough('/FT /Btn')
passthrough('/H /P')
passthrough('/F 4')
passthrough('/MK << /BC [ 1 0 0 ] /BG [ 1 1 1 ] /CA (4) >>')
passthrough('/DA (/ZaDb 0 Tf 0 g)')
passthrough('/ANN pdfmark')


This is fine as it works when creating a check box.

My problem is, I need to create multiple unique check boxes and I am unsure how the naming convention works in this case.

If I do a direct duplicate of the check box, they are related, meaning if I check one both will get checked.

What I need to do is uniquely identify each one separately and I was hoping someone wit PDF Mark experience could assist with me with the naming.

Regards,

Top
#39260 - 04/19/12 07:44 AM Re: Unique Check boxes using PDF Marks [Re: ]
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
The line
passthrough('/T (Checkbox)')
gives a title.
If you change it to Checkbox1, Checkbox2, etc you get independent boxes.

You can download the pdfmark manual here.

Top
#39262 - 04/19/12 09:14 AM Re: Unique Check boxes using PDF Marks [Re: stuartg]
Tyran van Zyl
Unregistered


Perfect, thanks Stuartg that solves my problem.

One more piece to the puzzle and I am sorted.

because I am creating so many on so many pages, I am using a static repeat with a variable that is changing after each box.

How can I use a variable as part of the name.
Meaning how do I use a variable in passthrough?

Thanks

Top
#39263 - 04/19/12 09:39 AM Re: Unique Check boxes using PDF Marks [Re: ]
Philippe F. Offline
OL Expert

Registered: 09/06/00
Posts: 1984
Loc: Objectif Lune, Montreal, Qc
Tyran,

Try something like:

passthrough('/T (' + &MyVariable + ')')
_________________________
Technical Product Manager
I don't want to achieve immortality through my work; I want to achieve immortality through not dying - Woody Allen

Top
#39264 - 04/19/12 09:42 AM Re: Unique Check boxes using PDF Marks [Re: Philippe F.]
Tyran van Zyl
Unregistered


Hi Phillipe

I thought the same.

I tried this

passthrough('/T (Checkbox' + &Unique) + ')')

but with no luck

Top
#39265 - 04/19/12 09:46 AM Re: Unique Check boxes using PDF Marks [Re: ]
Tyran van Zyl
Unregistered


Ok, just tried it again without the checkbox.

passthrough('/T (' + &Unique + ')')

And its working perfectly!

Thanks for the help guys

EDIT: It also works without that rogue bracket lol


Edited by Tyran van Zyl (04/19/12 09:46 AM)

Top
#39267 - 04/19/12 09:55 AM Re: Unique Check boxes using PDF Marks [Re: ]
stuartg Offline
OL Expert

Registered: 03/06/03
Posts: 713
Loc: Swindon, England
If you were using an integer variable &GlobalVariable1, then this should do it
passthrough('/T (Checkbox'+inttostr(&GlobalVariable1)+')')

Top