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!
Reader wants to save changes on close |
Post Reply |
Author | |
Jay2068
Beginner Joined: 11 Apr 06 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 04 Aug 06 at 12:34PM |
I've created a VB.NET program that creates and launches a PDF. When the end user closes the PDF it ask's to save changes. Is there a way to make it so it just closes the PDF without asking?
Edited by Jay2068 |
|
bogey
Senior Member Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
Post Options
Thanks(0)
|
I believe this is caused by the "setNeedsAppearances" property. It instructs Acrobat to scan the file and update all fields on load. Then it thinks the file has changed, causing the prompt.
|
|
Jay2068
Beginner Joined: 11 Apr 06 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
So no way around this then??
|
|
bogey
Senior Member Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
Post Options
Thanks(0)
|
Don't use the needsApperances option?
|
|
Jay2068
Beginner Joined: 11 Apr 06 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Ahh.. I thought that was an Adobe function. I checked it out and it works fine for the documents that have a single line fill in form. But when I'm sending text to a multi-line field it adds an odd square character to the left of the text. If I click on the "allow rich text formatting" it removes the squares. I'm sure this might just be a line feed or return character. The thing is I’m not sending the data to the form any different. Here is what I use to send the different types: Single Form Field: Call QP.SetFormFieldValueByTitle("eEmpPhone", CurrentEmpPhone) Multi-line Form field: QP.SetFormFieldValueByTitle("Salutation", Salutation) Dim fff As Integer = QP.FindFormFieldByTitle("Salutation") If fff <> 0 Then QP.SetFormFieldReadOnly(fff, 1) End If The only diffrence is I set the multi-line fields to read only. Both strings are coming from an SQL database. Anyone have any ideas why this is happening? |
|
chicks
Debenu Quick PDF Library Expert Joined: 29 Oct 05 Location: United States Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Do you need the forms to be fillable? If not, flatten the fields.
|
|
Jay2068
Beginner Joined: 11 Apr 06 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
That does the same thing. If I apply the 'flatten' to the field the squares show up. below is a sample letter that I create. The top field is not flattened and works great (but give me the save changes on exit). The bottom field (the rest of the letter) is flatten and it shows the odd characters.
Any help is appreciated. Thanks! |
|
Jay2068
Beginner Joined: 11 Apr 06 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Just for anyone in the future that might need to know. I solved the problem by removing the bad ASCII characters out of the string before I sent it to the PDF. Works great now!
Code i used: Friend Function removebadchar(ByVal TheString As String) For x As Integer = 0 To 12 While InStr(TheString, Chr(x)) > 0TheString = Replace(TheString, Chr(x), "") End While Next x For x As Integer = 14 To 31 While InStr(TheString, Chr(x)) > 0TheString = Replace(TheString, Chr(x), "") End While Next x For x As Integer = 127 To 255 While InStr(TheString, Chr(x)) > 0TheString = Replace(TheString, Chr(x), "") End While Next x Return TheString End Function
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store