Welcome Guest Search | Active Topics | Sign In | Register

Error when rendering a small page Options
Jamie Hassall
Posted: Thursday, December 20, 2012 6:12:27 AM
Rank: Newbie
Groups: Member

Joined: 6/2/2009
Posts: 6
Hi,

We have built an application that merges a number of PDF pages together, as part of this process we dynamically create a contents page.

We are dynamically adding the page number to the foot of the merged PDF documents and this is where we've hit a problem. If we try adding dynamic text to a PDF page whose page size (actual dimensions) are small (an example would be 1.98 x 2.81 inches) the DLL throws an error at the point we call opage.Render(strText).

Is writing to small pages a problem you are aware of, we have no control over the PDF's that are pulled into the final file as the customer controls the creating and uploading of the files.

Any help would be greatly appreciated.

Cheers,
Steve
eo_support
Posted: Thursday, December 20, 2012 9:06:02 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We are not aware of such problems. Can you provide a small piece of sample code that can reproduce the problem?

Thanks!
Jamie Hassall
Posted: Thursday, December 20, 2012 10:06:25 AM
Rank: Newbie
Groups: Member

Joined: 6/2/2009
Posts: 6
Thanks for the reply. The below is a snap shot of the code that's encountering the problem, the specific line that's breaking on files that have a small page size is oRender_Page.Render(oRoot).

oRender_Page = New AcmRender(docFinalPDF.Pages(intCnt), 0)
oRoot = New AcmContent()

' Create the target
txtCont = New AcmText("Page " & intPgCnt & " of " & docFinalPDF.Pages.Count)

' Create the link and store it in the array
lnkCont = New AcmLink(New AcmText("Page " & intPgCnt & ". " & .Rows(intArrCnt).Item("FFM_DocType") & " - Expiry Date: " & .Rows(intArrCnt).Item("dtmExpiry")))
lnkCont.TargetContent = txtCont
arrLnk(2, intArrCnt) = lnkCont

' Add the target
oRoot.Children.Add(txtCont)

' Render the changes
Try
oRender_Page.Render(oRoot)

' Increase the counters
intPgCnt = intPgCnt + 1

Catch ex As Exception

' If there's an error then catch the name of the file
strDocError = strDocError & .Rows(intArrCnt).Item("FFM_DocType") & vbCrLf
arrLnk(3, intArrCnt) = "ERROR"

End Try

This does only seem to happen on PDF's that have a small page size
eo_support
Posted: Thursday, December 20, 2012 10:14:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

Please provide a complete sample so that we can try to run it here. In your sample code, we do not know your vlaue of intPgCnt, txtCont or anything else. We can guess those values but we may still run into a totally different issue than the one you have. The idea is we need to reproduce EXACTLY the same issue you are having first. In order to do that we need to run EXACTLY the same code you are running. That's why need complete samples.

Thanks!


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.