TrimBox

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v5)  /  Re: TrimBox

DynamicPDF CoreSuite for .NET (v5) Forum

 Jul 07 2011 7:53 AM
How do I set TrimBox area? Please, any piece of code (Visual Basic 2010).

Yours
 Jul 07 2011 9:06 AM
Posted by a ceTe Software moderator
Hello,

You can set TrimBox dimensions without any problem using our DynamicPDF Merger for .NET product. You will need to use the ExtendedPageDimensions class to do this. Below is the sample code for it.

            Dim document As Document =  New Document()
            Dim page As Page =  New Page(590,690)
            document.Pages.Add(page)
            Dim pageDimensions As PageDimensions =  page.Dimensions
            Dim extendedPageDimensions As ExtendedPageDimensions =  New ExtendedPageDimensions(pageDimensions.Edge,pageDimensions.Body)
            extendedPageDimensions.TrimBox.Width = 100
            extendedPageDimensions.TrimBox.Height = 100
            extendedPageDimensions.TrimBox.Bottom = 100
            page.Dimensions = extendedPageDimensions
            document.Draw("C:\MyDocument.pdf")

If your application is targeting version 4.0 .NET framework then you will need to use our version 6 DynamicPDF Merger for .NET product dll. You will have to reference ceTe.DynamicPDF.40.dll in your application.

Please feel free to download the evaluation edition of version 6 DynamicPDF Merger for .NET product from our website at: http://www.DynamicPDF.com/Products/DynamicPDFForNET/Merger/Download.csp.

Thanks,
ceTe Software Support Team.
 Jul 07 2011 11:02 AM
Dim document As Document =  New Document()
Dim page As Page =  New Page(590,690)
Ddocument.Pages.Add(page)
Dim pageDimensions As PageDimensions =  page.Dimensions
Dim extendedPageDimensions As ExtendedPageDimensions =  New ExtendedPageDimensions(pageDimensions.Edge,pageDimensions.Body)
extendedPageDimensions.TrimBox.Width = 100
extendedPageDimensions.TrimBox.Height = 100
extendedPageDimensions.TrimBox.Bottom = 100
page.Dimensions = extendedPageDimensions
document.Draw("C:\MyDocument.pdf")

'------------------ Following inclusion of code:

Dim tb_test As ExtendedPageDimensions
tb_test = New ImportedPage("D:\MyDocument.pdf", 1).Dimensions
MsgBox(tb_test.TrimBox.Width)

message returned by the MsgBox = 590 (as expected - 100).

What am I doing wrong?
 Jul 08 2011 2:19 PM
Posted by a ceTe Software moderator
Hello,

We did some further testing and it seem like the Trim box values are not being read back from the created PDF file. We have forwarded this info to our developers to get their feedback. We will post on the forum once we receive an update from our developers.

Thanks,
ceTe Software Support Team.
 Jul 29 2011 10:11 AM
Posted by a ceTe Software moderator
Hello Satish,

We have released the latest build for the version 6 DynamicPDF for .NET which address the issue which you reported. Please login to our CustomerArea: support@cete.com using your product serial number and download the latest dll files. Remove reference for the old dll file and reference the latest in your application.

You can download the evaluation edition of version 6 DynamicPDF product from our website at: http://www.DynamicPDF.com/Products/DynamicPDFForNET/Suite/Download.csp.

Thanks,
ceTe software Support Team.
 Jul 29 2011 12:10 PM
I found a bug in version 5.1 and I thought that just will improve this version.
I do not want to buy version 6.0 ... :-(
 Jul 29 2011 2:04 PM
Posted by a ceTe Software moderator
Hello,

We will check with the development team to see whether they plan to resolve this in v5.1 of the product or not. We will post a reply as soon as we hear back from them.

Thanks,
ceTe Software Support Team
 Aug 01 2011 9:02 AM
Posted by a ceTe Software moderator
Hello,

We checked with our developers and they have fixed this issue in version 5.1 DynamicPDF for .NET product as well. Please contact our support team at: support@cete.com so that they can give you the link to download the latest version 5.1 dll file with the fix.

Thanks,
ceTe software Support Team.

All times are US Eastern Standard time. The time now is 8:03 PM.