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 - Page fills in reverse order
  FAQ FAQ  Forum Search   Register Register  Login Login

Page fills in reverse order

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


Joined: 01 Jul 09
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote danz26 Quote  Post ReplyReply Direct Link To This Post Topic: Page fills in reverse order
    Posted: 02 Jul 09 at 12:34AM
I am looping through the ascii file and adding each line of it to a pdf file using QuickPDFDrawText.  However it takes line 1 of the ascii file and starts at the bottom of the page and fills the page up.  So on each page the header is on the bottom and page number is on the top.  If I select the text and do a copy and paste of say page 1 and paste it into word.  It flips it around correctly.  Here is the code (sorry it is clarion, but hopefully you can follow it.)
 
    InstanceID = QuickPDFCreateLibrary();
    if (QuickPDFUnlockKey(InstanceID, regkey) = 1)
        do buildreport
        a# = QuickPDFSaveToFile(InstanceID, pdffilename)
    .
     QuickPDFReleaseLibrary(InstanceID)
 
buildreport routine
      QuickPDFAddStandardFont(InstanceID, 0)
      QuickPDFSelectFont(InstanceID, 0)
      QuickPDFSetTextSize(InstanceID, 12)
      QuickPDFSetTextAlign(InstanceID, 4)
     p# = 1
     pg# = 0
     ypos = 100
     AsciiName  ='ucs-report.out'
     open(asciifile)
     set(asciifile)
     loop
        next(asciifile)
        if error() then break.
        if p# > 64
           p# = 0
           ypos = 100
           QuickPDFNewPage(InstanceID)
           QuickPDFSetTextSize(InstanceID, 12)
           pg# += 1
        .
        p# += 1
        mytext = mem:asciiline
        a# = QuickPDFDrawText(InstanceID, 10, ypos, mytext)
        ypos += 10
       
     .
    close(asciifile)
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: 02 Jul 09 at 6:10AM
Hi Danz!
 
In pdf-standard the bottom of a page is the low one (it starts from below). The top of the page is high. If you want to change this QuickPDF offers the function SetOrigin.
 
SetOrigin(0) is standard and means "bottom, left".
1 = top, left
2 = top, right
3 = bottom, right
 
Cheers and welcome here,
Ingo
 
 
Back to Top
danz26 View Drop Down
Beginner
Beginner


Joined: 01 Jul 09
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote danz26 Quote  Post ReplyReply Direct Link To This Post Posted: 02 Jul 09 at 6:07PM
That did the trick.
 
Thanks,
Dan
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