Feild/Frame BackColor and visibility

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
amurphy
Posts: 8
Joined: Wed Jan 05 2005

Feild/Frame BackColor and visibility

Post by amurphy »

Hi I have the following problem

I have created a Field which has a defined background color, this shows just great in the OCX viewer, however it does not show on a saved document when loaded into adobe PDF viewer(5.0).

The code I have used is as below, i pass the cords into the function below, currently I have the back color hard coded in, it is the field version of this that is not working.
--------------------------------------

Code: Select all

Public Sub PDFPrintLine(ByRef pPrintObject As Object, lX1 As Single, lY1 As Single, lX2 As Single, lY2 As Single, pColour As Long, boxswitch As String)

Dim sCurCol As String
sCurCol = "000000"
Set printObject = pPrintObject

'Create a new print Object
currentObjectCount = currentObjectCount + 1
Select Case LCase(boxswitch)
    Case ""
        currentObjectName = "Line" & pObjectCount
        PDFO.CreateObject acObjectTypeLine, ObjectName
        Set currentObject = PDFO.GetObjectByName(ObjectName)
        With currentObject
            .Attribute("StrokeColor") = sCurCol
        End With
    Case "b"
        currentObjectName = "Frame" & pObjectCount
        PDFO.CreateObject acObjectTypeFrame, ObjectName
        Set currentObject = PDFO.GetObjectByName(ObjectName)
        With currentObject
            .Attribute("StrokeColor") = sCurCol
        End With
    Case "bf"
        currentObjectName = "Field" & pObjectCount
        PDFO.CreateObject acObjectTypeField, ObjectName
        Set currentObject = PDFO.GetObjectByName(ObjectName)
        With currentObject
            .Attribute("BackColor") = "296BF7"
        End With
    End Select

    With currentObject
        .Attribute("Left") = lX1
        .Attribute("Top") = lY1
        .Attribute("Right") = lX2
        .Attribute("Bottom") = lY2
    End With

End Sub
'then I save the file with the following

Code: Select all

PDFO.ReportState = acReportStateRun

PDFO.Open sPDFPath, ""
PDFO.Save PDFPath, 0
Please would you be able to advise what I should do, if there is a backcolor variable for a Frame then I am happy to use this instead as this shows just fine.

Many thanks

Andrew
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I tried a similar code using a new version of the PDF Creator. The background of the field appears in both the PDF Creator and Acrobat Reader 6.

The version i tried is not online yet but I suggest that you try to view the PDF file using Acrobat Reader 6, also if you are using an older version of the PDF Creator you may download our latest release 1.50J from www.amyuni.com

Hope this helps.
amurphy
Posts: 8
Joined: Wed Jan 05 2005

Post by amurphy »

Many thanks for your response, i shall try this, in the mean time I am using a text object instead.

Thanks Again
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

You shouldn't face similar problems with text objects. I suggest that you try Acrobat Reader 6 and or our latest version of the Creator.
Post Reply