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 - Document properties
  FAQ FAQ  Forum Search   Register Register  Login Login

Document properties

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


Joined: 30 Jan 16
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gianivo Quote  Post ReplyReply Direct Link To This Post Topic: Document properties
    Posted: 30 Jan 16 at 6:08PM
Hello everybody,
I need to read and modify some PDF's properties (Author, Title, ecc.) in an Access Program.
I read the attributes, but I can't modify them. I haven't any error in the program, but in the file I find the previous value. What is my mistake?
Thank you very much

Ivo

Here's the simple VBA code:

Sub GoAttr()
    Dim DPL As New DebenuPDFLibraryAX1211.PDFLibrary, Cart As New Cartelle
    Dim x, informazioni, lKey As Long, vTab, i As Integer, wMsg As String
    lKey = DPL.UnlockKey(kUnlock)
    x = DPL.LoadFromFile(kf2, "")
    vTab = Cart.TabellaAttributiPDF  'attrbutestab:'0=PDFVersion;1=Author;2=Title;3=Subject;
                                                       '4=Keywords;5=Creator;6=Producer;7=Creationdate;
                                                       '8=Modificationdate
    For i = 0 To UBound(vTab): wMsg = wMsg & vTab(i) & ": " & DPL.GetInformation(i) & vbCrLf: Next
    MsgBox wMsg
    i = DPL.SetInformation(3, "Special Text") ' "i=1", but the attribute is not changed in the file!
End Sub

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

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 16 at 8:59PM
Hi Ivo,

if kf2 contains a pdf-filename with path and drive then it should work.
If the file is encrypted then not ;-)
After load you should check if the file is encrypted and then you should decrypt it first before working on it.
The other thing:
I don't see a "save"? 
If you don't write the changed file back to disk your modification is only temporarely ;-)

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
gianivo View Drop Down
Beginner
Beginner


Joined: 30 Jan 16
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gianivo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jan 16 at 9:08PM
Thank you very much, Ingo.
I addedd "SaveToFile", but I need the same filename, and not a different filename! Furhermore, if I save the new document I can't delete it!
Cheers

Ivo
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 31 Jan 16 at 10:42AM
you can take the same name ... that's not a problem.
Cheers,
Ingo

Back to Top
gianivo View Drop Down
Beginner
Beginner


Joined: 30 Jan 16
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote gianivo Quote  Post ReplyReply Direct Link To This Post Posted: 01 Feb 16 at 9:01PM
Ok, it's running!

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