Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / OnePass Or Not OnePass, that is the question
Author Message
Iker Celorrio
Member
# Posted: 21 Feb 2005 20:03


Hi Support People!

I am using your library, and runs fastest that i 've never dream.

But i have some problems with memory allocation and page numeration.

From my app, i report some documents to a pdf file, and some documents have more than one page.
When i end to report a document, i back to the fiirst document page, and write its document page number and document total of pages. the proces is something like this:

Initialize PDFCreatorPilog
Start PDF File (NewDoc())
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Go to Page #1 (SetCurrentPage(1))
and Print "Page 1 of 3"
Go to Page #2 (SetCurrentPage(2))
and Print "Page 2 of 3"
Go to Page #3 (SetCurrentPage(3))
and Print "Page 3 of 3"
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Go to Page #4 (SetCurrentPage(4)
and Print "Page 1 of 2"
Go to Page #5
and Print "Page 2 of 2"
. . . .

This works fine when i report 10,20,30 documentos to an pdf file, but when i tried to report 1000 or 2000 documents to a pdf, it uses more than 400 to 800MB of RAM. (the file size is about 160MB)

One Solution is not to write the count of total pages, and not to back to previous written pages to write the string page x of y and use the option pdf.onepass to write directly to file, but it is not posible when i report some kind of documents, like orders or bills that customers requires that the pages are correctly paged on documents.

How can i use something like onepass property, but as a call, to "flush" the memory allocated pages to the file?

changing the other example, something like this:

Initialize PDFCreatorPilog
Start PDF File (NewDoc())
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Go to Page #1 (SetCurrentPage(1))
and Print "Page 1 of 3"
Go to Page #2 (SetCurrentPage(2))
and Print "Page 2 of 3"
Go to Page #3 (SetCurrentPage(3))
and Print "Page 3 of 3"
WritePendingToFile()
Print Page (all fields) (NewPage())
Print Page (all fields) (NewPage())
Go to Page #4 (SetCurrentPage(4)
and Print "Page 1 of 2"
Go to Page #5
and Print "Page 2 of 2"
WritePendingToFile()
. . . .

Only a Function will be enougth to "flush"/Write to a file programatically :)

Thanks and Best Regards
Iker Celorrio

PD: sorry about my english, is not as good as i wish

Stanislav
# Posted: 22 Feb 2005 21:19


Dear Iker,

i'll inform library developers about this feature request.

Best regards,
Stanislav

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.013

 

Page top