At 02:32 PM 7/12/2004 -0400, David Blocker wrote:

The following code prints a PDF file of an invoice in 7.1. The PDF file gets created,
I can open the file successfully here with both Adobe 5.1 and 6.0 readers, and with
Adobe Acrobat 6.0. However, Acrobat can't convert it to RTF giving this error:


Bad PDF: could not read page structure (bad page contents)

Many people I've sent these files to cannot open the file at all withe Adobe reader.

The code:

SET VAR vFileName = ('C:\Documents and Settings\David Blocker\My Documents\'+
+'DB'+.vCPID+'INV'+CTXT(.vINV#)+'.'+'PDF')

SET VAR vOptions = ('Filename'&.vFileName)
PRINT INVOICE WHERE CPID = .vCPID AND BILL IS NULL ORDER BY InvoiceDate T# +
OPTION PDF|.vOptions
It creates a file like "DBBmaINV66.PDF"

Any suggestions?


David,

Why not create an RTF report with OPTIMIZATION EASE_OF_EDITING option?

Syntax:

PRINT reportname WHERE whereclause ORDER BY orderbyclause +
OPTION RTF +
|SHOW_CANCEL_DIALOG value +
|FILENAME filespec +
|TITLE value +
|SUBJECT value +
|AUTHOR value +
|KEYWORDS value +
|BACKGROUND_COLOR value +
|BACKGROUND_TYPE value +
|BACKGROUND_FILE filespec +
|IMAGE_FORMAT value +
|IMAGE_DPI value +
|INCLUDE_SHAPES value +
|INCLUDE_IMAGES value +
|INCLUDE_IMAGES value +
|INCLUDE_LINES value +
|INCLUDE_RICHTEXT value +
|JPEG_QUALITY value +
|OPTIMIZATION value +
|OPEN value

Where:

SHOW_CANCEL_DIALOG
Specifies whether to show/suppress cancel dialog box during
the print process
� ON
� OFF

FILENAME
filename of RTF File

TITLE
Stores the title of the RTF report.

SUBJECT
Stores the subject of the RTF report.

AUTHOR
Stores the name of the author of the RTF report.

KEYWORDS
Stores the list of keywords used in the report. Specify a
list of keywords for the document that should be encoded
as the Keywords content.

BACKGROUND_COLOR
Indicates the color to be used as background color of all
pages of report (default : White)
� AQUA
� BLACK
� BLUE
� CREAM
� DARK GRAY
� FUCHSIA
� GRAY
� GREEN
� LIME
� LIGHT GRAY
� MAROON
� MEDIUM GRAY
� MINT GREEN
� NAVY
� OLIVE
� PURPLE
� RED
� SILVER
� SKY BLUE
� TEAL
� WHITE
� YELLOW

BACKGROUND_TYPE
Specifies the way background image has to be displayed in
the rtf-file.
� TILE
� TOPLEFT
� TOPCENTER
� TOPRIGHT
� CENTERLEFT
� CENTER
� CENTERRIGHT
� BOTTOMLEFT
� BOTTOMCENTER
� BOTTOMRIGHT

BACKGROUND_FILE
Stores the image file name that is to be used as background
image of all pages of report.

IMAGE_FORMAT
Specifies the Linked image file format for image controls
used in the report
� GIF
� JPG
� BMP

IMAGE_DPI
Indicates the DPI value to be used while encoding images.

INCLUDE_IMAGES
Specifies whether Images on the report should be included in
the exported file.
� ON
� OFF

INCLUDE_LINES
Specifies whether lines on the report should be included in
the exported file.
� ON
� OFF

INCLUDE_RICHTEXT
Specifies whether contents of the RichText objects on the
report should be included in the exported file
� ON
� OFF

INCLUDE_SHAPES
Specifies whether shapes on the report should be included in
the exported file.
. ON
� OFF

JPEG_QUALITY
Specifies the Quality of the JPEG Image. Used when IMAGE_FORMAT = JPG.

OPTIMIZATION
Resulting RTF document can be either optimized for positional accuracy
(meaning that the placement of the objects will be as close as possible
to a printed report), or for ease of editing (meaning that everything
is treated as simple text and it is much easier to edit the file at the
expense of aesthetics).

. POSITIONAL_ACCURACY
. EASE_OF_EDITING

OPEN
Specifies whether the report should be opened after it is generated
� ON
� OFF

Very Best R:egards,

Razzak.



Reply via email to