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 - DA Function
  FAQ FAQ  Forum Search   Register Register  Login Login

DA Function

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


Joined: 26 Jul 09
Location: Italy
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dario Quote  Post ReplyReply Direct Link To This Post Topic: DA Function
    Posted: 20 Oct 09 at 8:26PM
I'm working with the DAFunction like DASetInformation, DAOpenFile, DAGetInformation. I call the functions within a Thread, and the function often doesn't work! If I use the normal function like GetInformation or SetInformation 80% of my PDF are broken. Are there any informations about?
The same code with the same PDF 5 time works and 1 doesn't work with DA Function. Are there any tricks? The normal functions (NOT DA) works only with little PDF (0-400Mbyte), but they work very well. With DA function instead, I have a lot of problems....
Thanks for any informations
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: 21 Oct 09 at 7:02AM
Hi Dario!

In the last six years i've done a lot with pdf-documents and the biggest file i've ever had was 262 mbytes. If your small files have a range up to 400 mbytes ... how big are the files you're working with the da-functions? Perhaps your problem is a timing problem? Do you wait calling a function again until you get the result from the previous call? If not: Do it ;-)

Cheers, Ingo

Back to Top
Dario View Drop Down
Beginner
Beginner


Joined: 26 Jul 09
Location: Italy
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dario Quote  Post ReplyReply Direct Link To This Post Posted: 21 Oct 09 at 10:44AM
OK, but the problems there are even with small files.
You said to wait for the process, how? The thing incredible is that I use the feel back 0 or 1 for to see if the functio work good, and the aswer is always 1 (all ok) but if I set two propriety like "Subect" and "Title" in the same sub, often I have only one propriety setting ok, and often the second line of code. I use the ActiveX 0716 version and all code is BWR Thread in VB.Net
See below:
 

Try

Dim Cartella2DTEMP As New System.IO.DirectoryInfo(PathConverti2OffSetTemp)

If Not Cartella2DTEMP.Exists Then Cartella2DTEMP.Create()

Dim ThreadFILE2 As System.IO.FileInfo = Nothing

Dim FilePDF2DElaborato As String = Nothing

For Each ThreadFILE2 In Cartella2DTEMP.GetFiles

If UCase(ThreadFILE2.Extension) = ".PDF" Then

If Not (ThreadFILE2.Attributes And FileAttributes.System) = FileAttributes.System And Not (ThreadFILE2.Attributes And FileAttributes.Hidden) = FileAttributes.Hidden Then

Dim Nome2Dps As String = ThreadFILE2.Name.Substring(0, ThreadFILE2.Name.Length - 4)

If Nome2Dps.Substring(0, 3) = "1D_" Or Nome2Dps.Substring(0, 3) = "2D_" Then Nome2Dps = Nome2Dps.Substring(6, Nome2Dps.Length - 6)

FilePDF2DElaborato = PathConverti2Scan & "OFFSET\OUT\" & ThreadFILE2.Name.Substring(0, ThreadFILE2.Name.Length - 3) & "PDF"

FileOpen(1, ThreadFILE2.FullName, OpenMode.Binary)

FileClose(1)

Dim QUICKPDF_Doc As New QuickPDFAX0716.PDFLibrary

QUICKPDF_Doc.UnlockKey(Licenza)

Dim HandlerFILE As Long = QUICKPDF_Doc.DAOpenFile(ThreadFILE2.FullName, "")

Risultato = QUICKPDF_Doc.DASetInformation(HandlerFILE, "Title", Nome2Dps)

If Risultato = 0 Then

.........

Exit Try

End If

Risultato = QUICKPDF_Doc.DASetInformation(HandlerFILE, "Subject", "2")

If Risultato = 0 Then

.....

Exit Try

End If

Risultato = QUICKPDF_Doc.DASetInformation(HandlerFILE, "Producer", "ProXFLOW " & My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build & "." & My.Application.Info.Version.MinorRevision)

If Risultato = 0 Then

.....

Exit Try

End If

If System.IO.File.Exists(FilePDF2DElaborato) Then System.IO.File.Delete(FilePDF2DElaborato)

Risultato = QUICKPDF_Doc.DASaveAsFile(HandlerFILE, FilePDF2DElaborato)

If Risultato = 1 Then System.IO.File.Delete(ThreadFILE2.FullName)

End If

Else

If Not (ThreadFILE2.Attributes And FileAttributes.System) = FileAttributes.System And Not (ThreadFILE2.Attributes And FileAttributes.Hidden) = FileAttributes.Hidden Then

FileOpen(1, ThreadFILE2.FullName, OpenMode.Binary)

FileClose(1)

If System.IO.File.Exists(PathConverti2Err & ThreadFILE2.Name) Then System.IO.File.Delete(PathConverti2Err & ThreadFILE2.Name)

System.IO.File.Move(ThreadFILE2.FullName, PathConverti2Err & ThreadFILE2.Name)

End If

End If

Next

Catch When Err.Number = 75

Exit Try

.....

Catch

End Try

where am I wrong? I hevn't any exception....
Thanks for ay information
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