Maximum PDF page width/height?

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

Maximum PDF page width/height?

Post by sprezzatura » Mon Jan 19 2009

I am using Amyuni Converter 3.01.

Why does the following code truncate the paper width as though it was stored internally as a signed, 16-bit integer? If you call SetPaperWidth(50800), then GetPaperWidth() returns -14736, which is the equivalent signed value when '50800' is treated as a signed short.

Code: Select all

long dim_mm;
dim_mm = 50800;		// 50800 = 0xC670 = 5080.0 mm = 200" 
SetPaperWidth(m_AmyuniConverter, dim_mm);
dim_mm = GetPaperWidth(m_AmyuniConverter);	// returns -14736, which is "0xC670" treated as signed 16-bit
The return value has to be cast as (unsigned short) to work, which shouldn't be necessary since GetPaperWidth() is supposed to return a 'long' according to the Header file.

Further, is the maximum Amyuni page width & height 256"?

Thanks.

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Maximum PDF page width/height?

Post by Jose » Tue Jan 20 2009

Hello,

1- Internally as a signed, 16-bit integer?
When printing we use window’s DEVMODE structure and this structure uses a Short integer for (ex:) dmPaperLength.

It seems that that we are not correctly casting this value when returning and we are going to resolve this in our next version of the PDF Converter.

2- Amyuni page width & height 256"?
Adobe acrobat has actually has a limitation on the maximum page size it can render. If a document is longer than 200 inches, it will not render correctly in Adobe Reader. This limitation does not exist in our PDF Creator product.

Hope this helps?

Jose
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

sprezzatura
Posts: 46
Joined: Fri Nov 18 2005
Location: Nova Scotia

Re: Maximum PDF page width/height?

Post by sprezzatura » Tue Jan 20 2009

Jose wrote: When printing we use window’s DEVMODE structure and this structure uses a Short integer for (ex:) dmPaperLength.
OK, I understand. So this means that Amyuni is limited to dmPaperLength = 65,535 (maximum unsigned short), which is 6,553.5 mm, or approx. 258 inches. Is this correct?

According to Adobe, with Acrobat 9 it is now possible to print a document of 15,000,000 inches http://help.adobe.com/en_US/Acrobat/9.0 ... bd5.w.html.

Post Reply