|
Rank: Newbie Groups: Member
Joined: 12/16/2013 Posts: 4
|
Hi i need a little help, i would want to insert a block on a document with more pages. The block must be in the same place in all pages, but i found it n different places the code is like this
Code: Visual Basic.NET
For Me.IndicePagina = 0 To PagesCount
MyPageToModify = ManipulatePdf.Pages(IndicePagina)
Dim gdiImage As System.Drawing.Image = System.Drawing.Image.FromFile("c:\logo.png")
'Create an AcmImage object
Dim image As New EO.Pdf.Acm.AcmImage(gdiImage)
'Create an AcmBlock object to hold the AcmImage object
Dim block As New EO.Pdf.Acm.AcmBlock()
block.Style.Top = 1
block.Style.Left = 1
block.Style.Height = 0.2
block.Style.Width = 1
block.Children.Add(image)
Dim MyRender As EO.Pdf.Acm.AcmRender
MyRender = New EO.Pdf.Acm.AcmRender(MyPageToModify, IndicePagina)
MyRender.Render(block)
Next
IndiceBS = DocModify.LastIndexOf("\")
'Save it to a new file
ManipulatePdf.Save("C:\manipolato\" & DocModify.Substring(IndiceBS + 1))
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Any idea?? Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Your code looks correct. Can you send your PDF file to us so that we can take a look? We will PM you as to where to send the files.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, We have looked into your sample app. The problem is this line in your code:
Code: Visual Basic.NET
MyRender = New EO.Pdf.Acm.AcmRender(MyPageToModify, IndicePagina)
The second argument is the vertical position of your content in your MyPageToModify, so if you wish the image to appear at fixed location on every page, then you should pass the same value for every page. Sorry that we didn't spot this earlier. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 12/16/2013 Posts: 4
|
Right!!!!!! It works fine, thanks for the Support!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
You are welcome. Please feel free to let us know if there is anything else.
|
|