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 - Insert Lines In PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Insert Lines In PDF

 Post Reply Post Reply
Author
Message Reverse Sort Order
Danish_k12 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Apr 09
Location: India
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Danish_k12 Quote  Post ReplyReply Direct Link To This Post Topic: Insert Lines In PDF
    Posted: 18 Apr 09 at 6:57AM
Thank you for your quick reply the code is now working without error.
But there is a major issue we have to always work on may files (400 to 500) each  being nearly 20,000 pages.
The above code is taking 1 sec for 2 pages which is quite slow it will take a large amount of time for me to process it.
One thing i have notice is the speed is reducing as the number of pages increase like for suppose first 1000 page it took me 10 min next thousand page it has taken me 15 min and so on....
Back to Top
DELBEKE View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert
Avatar

Joined: 31 Oct 05
Location: France
Status: Offline
Points: 151
Post Options Post Options   Thanks (0) Thanks(0)   Quote DELBEKE Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 09 at 5:34AM
You shoul avoid mixing direct acces function (those begining whit the DA prefix) with standards ones.
 
here is a sample of what you should do
Private Sub Command1_Click()
Dim Qp As QuickPDFAX0712.PDFLibrary
Dim I As Long
Dim PageCount As Long
Dim Liner As String
Dim DocId As Long
Set Qp = CreateObject("QuickPDFAX0712.PDFLibrary")
Call Qp.UnlockKey("my key")
Qp.LoadFromFile ("c:\test.pdf")
DocId = Qp.GetDocumentID(1)
PageCount = Qp.PageCount
For I = 1 To PageCount
  Qp.SelectPage I
  Liner = Qp.GetPageText(0)
  If InStr(1, Liner, "Page No 1") > 0 Then
      Call Qp.DrawLine(10, 750, 100, 750)
      Call Qp.DrawLine(10, 700, 100, 700)
  Else
      Call Qp.DrawLine(10, 700, 100, 700)
  End If
Next I
Qp.SaveToFile "c:\test_omr.pdf')"
Qp.RemoveDocument DocId
End Sub


Edited by DELBEKE - 18 Apr 09 at 5:35AM
Back to Top
Danish_k12 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Apr 09
Location: India
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Danish_k12 Quote  Post ReplyReply Direct Link To This Post Posted: 18 Apr 09 at 5:10AM
I work in a Company which deals in Variable Data Printing (VDP). We recieve file in various format. I am currently working as a Sr.Software Engineer and have do deal with file manipulation.
I have done file manipulation in text format, html format, etc.
The only format i have been unsuccessful is PDF format.
Recently i posted a article about this in Dani Web as mostly i programmed using Vb6 (Think pretty good in it).
And got link to quick PDF.
Well I think it would do most of my job.
I need to sort PDF file on basis of their pincode, Insert OMR LINE etc.
Well I started with Inserting OMR LINE in vb6.
Sample Code:

Set qp = CreateObject("QuickPDFAX0712.PDFLibrary")
Call qp.UnlockKey("Licence Key")
qp.LoadFromFile ("c:\test.pdf")

a = qp.DAOpenFile("c:\test.pdf", "")
pagecount = qp.pagecount
For i = 1 To pagecount
    b = qp.DAFindPage(a, i)
    liner = qp.DAExtractPageText(a, b, 0)
    qp.SelectPage (i)
    If InStr(1, liner, "Page No 1") > 0 Then
        Call qp.DrawLine(10, 750, 100, 750)
        Call qp.DrawLine(10, 700, 100, 700)
    Else
        Call qp.DrawLine(10, 700, 100, 700)
    End If
Next i

(For those who are not familiar with VDP I'll Explain wat i m trying to do here I have to insert two lines on 1st page of all statement and one line on remaining pages of that statement )

It is working fine for me the problem is it gives error after 117 page approx. Out Of Memory Dead

Please Help. What should i do?????
Where am i gng wrong.????

Regards,
Danish Khan

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