Print Page | Close Window

How it works highlight form fields?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2134
Printed Date: 09 Jun 25 at 8:11AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How it works highlight form fields?
Posted By: dkryaklin
Subject: How it works highlight form fields?
Date Posted: 08 Feb 12 at 9:22AM
How it works highlight (SetFormFieldHighlightMode) form fields?

My code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        QP = CreateObject(ClassName)
        QP.UnlockKey(LicenseKey)

        Dim s As String = Application.StartupPath & "\test.pdf"

        QP.LoadFromFile(s, "")
        QP.SetNeedAppearances(1)

        QP.SelectPage(1)

        Dim fnt As Integer = QP.AddFormFont(QP.AddTrueTypeFont("Arial", 1))
        Dim i As Integer = QP.NewFormField("test", 1)

        QP.SetFormFieldValue(i, "test")
        QP.SetFormFieldFont(i, fnt)
        QP.SetFormFieldAlignment(i, 1)

        QP.SetFormFieldBounds(i, 100, 100, 100, 100)
        QP.SetFormFieldBorderColor(i, 1, 0, 0)

        QP.SetFormFieldPage(i, 1)
        QP.SetFormFieldRotation(1, 0)

        QP.SetFormFieldHighlightMode(i, 3)

        QP.UpdateAppearanceStream(i)

        QP.RenderPageToFile(72, 1, 1, Application.StartupPath & "\test.jpg")
        PictureBox1.ImageLocation = Application.StartupPath & "\test.jpg"
    End Sub

Highlighting not. only the border

file http://dl.dropbox.com/u/3474175/test.pdf

Quick PDF Library - 8.14 beta 4 (ActiveX)



Replies:
Posted By: AndrewC
Date Posted: 09 Feb 12 at 7:27AM
The Highlighting mode is only used by Acrobat Viewer to change the appearance of the field when the mouse is moved on top of the FormField.  It is not rendered as part of the RenderPageToFile function.

You would neet add a thick border and color to simulate a highlight.

Andrew.


Posted By: dkryaklin
Date Posted: 09 Feb 12 at 7:59AM
Thanks

I think it must be added to function reference

Dmitry



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk