Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Form Field Flatten
  FAQ FAQ  Forum Search   Register Register  Login Login

Form Field Flatten

 Post Reply Post Reply
Author
Message
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Topic: Form Field Flatten
    Posted: 19 Mar 13 at 3:37PM
Hi all,
I use SetFormFieldValue to fill form from datadase in an web application.
this works great but I need to make the document flat after this.
so Use UpdateAndFlattenFormField.
the problem is that the flatten text is offset downward:

Before Flattening:



After Flattening:



Any idea why this would be happening?
thanks


Edited by lambda - 19 Mar 13 at 3:45PM
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 22 Mar 13 at 1:29AM
Hi lambda,

Thanks for your email.

Can you please upload the PDF that you are testing with before and after it has been filled and flattened?

Cheers,
- Rowan.
Back to Top
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Posted: 22 Mar 13 at 11:10AM
Hi thanks for your reply,
I could not find a way to upload them so please find them as a share linked for dropbox

https://www.dropbox.com/s/mnppt4di15g75mw/With%20normal%20fields.pdf

https://www.dropbox.com/s/z3akv1k8uw7rtcj/With%20Flatten%20fields.pdf

it looks like the flatten add some padding inside the field box.

the app takes the blank form created in word with cenopdf. and fill the fields from database using the field id:

if text length is bigger than 150 the font is set to 0 to fit shrink to fit. ( very nice feature by the way).

  For i As Integer = 0 To LoA.Count - 1
                Dim Fid As Integer = 0
                Fid = QP.FindFormFieldByTitle(LoA(i).PDFID)
                If Fid = 0 Then Throw New Exception("Field ID " & LoA(i).PDFID & " Not Found in " & BlankForm)
                If LoA(i).FieldType = "txt" Then

                    If LoA(i).Ans.Length > 150 Then
                        QP.SetFormFieldTextSize(Fid, 0)

                    Else
                        QP.SetFormFieldTextSize(Fid, 10)
                    End If
                    QP.SetFormFieldColor(Fid, 0, 0.4, 1)
                    QP.SetFormFieldTextFlags(Fid, 1, 0, 0, 0, 1)
                    If QP.SetFormFieldValue(Fid, LoA(i).Ans) < 1 Then Throw New Exception("Fail to fill in Field Value")


                End If

            Next

            'While FieldCount > 0
            '    QP.UpdateAndFlattenFormField(FieldCount)
            '    FieldCount -= 1
            'End While

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 25 Mar 13 at 11:18PM
Which version of QPL are you using to flatten the formfields ?
Back to Top
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Posted: 26 Mar 13 at 3:39PM
DebenuPDFLibraryDLL0911,

Look like it is recent enough

thanks
Back to Top
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 13 at 8:07AM
Any idea why this is behaving in that way?
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 15 Apr 13 at 9:05AM

It is happening because Acrobat decided to change the border width calculations if the formfield is set to be a multi-line formfield.   I did a quick test with other PDF Viewers and many of them also dont render the formfields in the same vertical position as Acrobat does. 

I have made some changes to QPL 9.14 Beta 3 so that the appearance stream created by flattening will more closely match that of Acrobat for multi-line formfields.  9.14 beta 3 will be released sometime this week hopefully.

Andrew.
Back to Top
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Posted: 15 Apr 13 at 9:52AM
Many thanks for your support
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 13 at 11:06AM
DQPL 9.14 Beta 3 contains improvements to more closely match output from Acrobat.

It can be downloaded from here

http://www.debenu.com/blog/debenu-quick-pdf-library-9-14-beta-3-released.html

Andrew.
Back to Top
lambda View Drop Down
Beginner
Beginner


Joined: 19 Mar 13
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote lambda Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 13 at 2:07PM
Yes that's definitely an improvement. It is also linked to the field height.
For one line fields, making the field narrow enough make for very good match between field and flattened text.
many thanks.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store