Welcome Guest Search | Active Topics | Sign In | Register

AcmBlock Options
rosariob
Posted: Friday, March 14, 2014 7:34:56 AM
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
eo_support
Posted: Friday, March 14, 2014 12:48:02 PM
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!
eo_support
Posted: Monday, March 17, 2014 10:59:44 AM
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!
rosariob
Posted: Tuesday, March 18, 2014 7:06:23 AM
Rank: Newbie
Groups: Member

Joined: 12/16/2013
Posts: 4
Angel Angel

Right!!!!!!
It works fine, thanks for the Support!
eo_support
Posted: Tuesday, March 18, 2014 9:03:14 AM
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.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.