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 - Out of Memory error
  FAQ FAQ  Forum Search   Register Register  Login Login

Out of Memory error

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


Joined: 29 Jul 08
Location: Singapore
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote kyawkoko Quote  Post ReplyReply Direct Link To This Post Topic: Out of Memory error
    Posted: 29 Jul 08 at 11:48PM
Hi everyone,

  i am using ised quick pdf to export pdf report in vb.net.For large pdf report,
i got out of memory error.Please help me.

Thanks,
Ko Ko

This is my sample code.

 For index = 0 To DataGridView1.RowCount - 1
                If (index Mod 45) = 0 Then
                    If index <> 0 Then
                        PDFnewGen.NewPage()
                    End If
                   
                    iPage = iPage + 1
                End If

                sTemp = DataGridView1.Rows(index).Cells(0).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)


                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(13, ((index Mod 45) + 6) * 5, 10, 5, PDFnewGen.GetSubsetString(sTemp), 0)


                sTemp = DataGridView1.Rows(index).Cells(1).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)
                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(35, ((index Mod 45) + 6) * 5, 40, 5, PDFnewGen.GetSubsetString(sTemp), 0)


                sTemp = DataGridView1.Rows(index).Cells(2).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)
                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(67, ((index Mod 45) + 6) * 5, 40, 5, PDFnewGen.GetSubsetString(sTemp), 0)


                sTemp = DataGridView1.Rows(index).Cells(3).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)
                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(110, ((index Mod 45) + 6) * 5, 30, 5, PDFnewGen.GetSubsetString(sTemp), 0)


                sTemp = DataGridView1.Rows(index).Cells(4).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)
                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(143, ((index Mod 45) + 6) * 5, 40, 5, PDFnewGen.GetSubsetString(sTemp), 0)


                sTemp = DataGridView1.Rows(index).Cells(5).Value
                PDFnewGen.AddSubsettedFont("Times New Roman", 11, sTemp)
                PDFnewGen.SetTextSize(8)
                PDFnewGen.SetTextAlign(0)
                PDFnewGen.DrawTextBox(183, ((index Mod 45) + 6) * 5, 40, 5, PDFnewGen.GetSubsetString(sTemp), 0)



                ProgressBar.ProgressBar1.PerformStep()



            Next index

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: 30 Jul 08 at 7:37AM

Try to add the font once

PDFnewGen.AddTrueTypeFont("Times New Roman", 1)
PDFnewGen.SetTextSize(8)
PDFnewGen.SetTextAlign(0)
For index = 0 To DataGridView1.RowCount - 1
                If (index Mod 45) = 0 Then
                    If index <> 0 Then
                        PDFnewGen.NewPage()
                    End If
                   
                    iPage = iPage + 1
                End If

                sTemp = DataGridView1.Rows(index).Cells(0).Value
                PDFnewGen.DrawTextBox(13, ((index Mod 45) + 6) * 5, 10, 5,sTemp, 0)


                sTemp = DataGridView1.Rows(index).Cells(1).Value
                PDFnewGen.DrawTextBox(35, ((index Mod 45) + 6) * 5, 40, 5, sTemp, 0)


                sTemp = DataGridView1.Rows(index).Cells(2).Value
                PDFnewGen.DrawTextBox(67, ((index Mod 45) + 6) * 5, 40, 5, sTemp, 0)


                sTemp = DataGridView1.Rows(index).Cells(3).Value
                PDFnewGen.DrawTextBox(110, ((index Mod 45) + 6) * 5, 30, 5, sTemp, 0)


                sTemp = DataGridView1.Rows(index).Cells(4).Value
                PDFnewGen.DrawTextBox(143, ((index Mod 45) + 6) * 5, 40, 5, sTemp, 0)


                sTemp = DataGridView1.Rows(index).Cells(5).Value
                PDFnewGen.DrawTextBox(183, ((index Mod 45) + 6) * 5, 40, 5, sTemp, 0)



                ProgressBar.ProgressBar1.PerformStep()



            Next index

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 02 Aug 08 at 6:53PM
Hi!
Please try first the latest version (not 5.11) here from our library section. Your old key is still valid.
best regards,
Ingo
Back to Top
kyawkoko View Drop Down
Beginner
Beginner


Joined: 29 Jul 08
Location: Singapore
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote kyawkoko Quote  Post ReplyReply Direct Link To This Post Posted: 06 Aug 08 at 3:42AM
Thanks DELBEKE and Ingo for your's reply.I passed this problem by adding the font once.

KO KO
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