Template problem

If you are a VB developer and have questions about using our products from VB, here is the place to post them.
Post Reply
Markten
Posts: 11
Joined: Thu Jan 19 2006

Template problem

Post by Markten »

Hi Amyuni team!
I have a problem with Template

Here I've created a 1 Page template, and also I've created a Data document that contains 3 pages

First I'm loading the Template with the Flag TemplateRepeat=True
after that I'm loading the Data document(3 pages),
and when the program try to load this document the program crash ...accessing memory bla bla

What I'm hoping to have at the end is 3 pages of data with the template repeated on each page

This code work fine when my data document has only on page, but if my data document has more than one page my program crash

Here my code, did I need to add something ?

With PDF1
.TemplateMode = 1
.TemplateRepeat = True

.Open "c:\MyTemplate.PDF", "" 'Here my 1 Page Template

.TemplateMode = 0
.ReportState = acReportStateDesign

.Open "c:\testFilledServiceInvoice3pages.PDF", "" 'Here My 3 page Data document
'I've REM this line .Open "c:\testFilledServiceInvoice1pages.PDF", "" 'When I uncomment this line the program work fine , this my Data Document with only 1 page


' refresh the display (in case we're viewing the file)
.CurrentPage = 1
.Refresh

' save the file
.Save "c:\test.pdf", 0 'Save the End Result
End With
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

Will check this and get back to you.

Please don't cross post the same issue in two different forums.

Will reply to: http://www.amyuni.com/forum/viewtopic.php?t=1602 as this is related more to the PDF Creator then to VB.

I guess there is some typo in your above code, you commented the 1 page document while as i understand oening a 1 page data file works, it is when you open a 3 pages data file that the application freezes.
Post Reply