space1 separator space2  

Code Samples - Neevia PDFresize/scale

Example 3: Resize a specified page in a PDF file - C++ Copy 

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
   #include "stdafx.h"

   #using <mscorlib.dll>
   #import "PDFresize.tlb" no_namespace named_guids 
   using namespace System;

   int _tmain()
   {
	IPDFresizePtr NVresize;	
	::CoInitialize(NULL); 

	NVresize.CreateInstance(__uuidof(PDFresize)); 

	NVresize->PutPageWidth(5);
	NVresize->PutPageHeight(10);
	NVresize->PutUnits(1);

	NVresize->PutScale(true);
	NVresize->PutConstrainProportions(true);

	NVresize->PutCenter(true);

	NVresize->PutPages("1");

	NVresize->ResizePDF("c:\\in.pdf", "c:\\out.pdf");

	Console::WriteLine(S"Done.");
	return 0;
   }