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!
![]() |
DA Function |
Post Reply
|
| Author | |
Dario
Beginner
Joined: 26 Jul 09 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
Topic: DA FunctionPosted: 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
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Dario
Beginner
Joined: 26 Jul 09 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Quote Reply
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.PDFLibraryQUICKPDF_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 IfRisultato = QUICKPDF_Doc.DASetInformation(HandlerFILE, "Subject", "2") If Risultato = 0 Then..... Exit Try End IfRisultato = 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 ThenFileOpen(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 |
|
![]() |
|
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