Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Beginners


Topic: PostScript passthrough radio buttons
Conf: (P-PDF) Beginners, Msg: 171135
From: dzine
Date: 8/14/2009 01:27 AM

I am having trouble with radio buttons for an interactive PDF. I am coding within PlanetPress, sending passthrough PostScript commands to make fillable fields on the PDF produced.

I found a few examples of PostScript radio button code in Adobe reference documents, but they error when I try to passthrough from PlanetPress. I think maybe they need more code to work, like the "Move To" section tagged onto sample Listbox code to make it work, but "Move to" chunk doesn't get things working for Radio Button sample code. Does anyone have FUNCTIONING passthrough PostScript radio button code to share?


Here's complete code a functional list box run from:

% Define listbox Licence Class Required
define(&lbName, string, 'LicReq')
% Create the PDF listbox
% Set listbox Location
passthrough('[ /Rect [ 0 0 ' + floattostr(&Width * 72) + ' ' + floattostr(&Height * 72) + ']')
% Set field Name
passthrough('/T (' + &lbName + ')')
% Set field type to popup listbox and make printable
passthrough('/FT /Ch /F 4 /Ff 131072')
% Set border width and style
passthrough('/BS << /S /S /W 1 >>')
% Set border and background color in RGB
% for black border, BC [ 0 0 0 ]
passthrough('/MK << /BC [ 1 1 1 ] /BG [ 1 1 1] >>')
% Set text attributes
passthrough('/DA (/Helv 12 Tf 0 0 0 rg)')
% Set default value
passthrough('/DV (Canvas)')
passthrough('/Opt [ [ (Canvas)(1)] [ (Canvas)(2)] [ (Canvas)(3)] [ (Canvas)(4)] [ (Canvas)(5)] [ (Canvas)(5&6)][ (Canvas)(6)] [ (Canvas)(7)] ]')
% Finalize listbox
passthrough('/Subtype /Widget /ANN pdfmark')
% Create PlanetPress visible border
% for black border SetStrokeColor([000])
MoveTo(0,0)
SetLineWidth(0.0000)
SetStrokeColor([000])
SetFillColor([0])
LineTo(&width,0.0000)
LineTo(&width,&height)
LineTo(0.0000,&height)
LineTo(0.0000,0.0000)
ClosePath()
Stroke()
MoveTo(&Width,&Height)


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.