Change scaling of PDF Document

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: Tracker Support, TrackerSupp-Daniel, Chris - Tracker Supp, Vasyl-Tracker Dev Team, Sean - Tracker, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Support Staff, moderators

Post Reply
igorg
User
Posts: 38
Joined: Thu Nov 30, 2006 7:51 am

Change scaling of PDF Document

Post by igorg » Wed Jun 27, 2007 11:10 am

How can i change the Scaling of PDF Document in C# ?

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Jun 27, 2007 11:28 am

Hi,

That depends very much on the content and the method you are using to convert that content.

Please give more info and if possible samples.

Any files uploaded must be Zipped.

thanks.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

igorg
User
Posts: 38
Joined: Thu Nov 30, 2006 7:51 am

Post by igorg » Wed Jun 27, 2007 11:55 am

i want to decrease the size of all objects in PDF file 10% of origin size.
The example is : if i want to draw frame arround the PDF document , i
hide the parts of information in PDF document with the Frame Line and i want not hide this information by scaling down the origin PDF Document and draw the frame .

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Thu Jun 28, 2007 8:39 am

Hi,

Assuming you wish to apply this to existing PDF pages :

Please see the xcpro35.dll help file called xcpro35.chm and specifically the function :

PXCp_TransformPage function.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

igorg
User
Posts: 38
Joined: Thu Nov 30, 2006 7:51 am

Post by igorg » Sun Jul 01, 2007 11:21 am

Send me please the example code or link to example code, how you manipulate Page with PXCp_TransformPage function in C#.

Thank's vaery match

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Mon Jul 02, 2007 7:46 pm

Please be clearer -

We are confused - do you wish to display the page on screen using with the PDF-XChange Viewer ActiveX - or Simple DLL's options (if so - which one ?)

Or do you wish to modify the PDF page permanently using the XCPRO35.dll and library functions previously mentioned ?

If for example you are using the PDF-XChange Viewer ActiveX - there is already sample C# code example available - please see the example (PDFViewerActiveXTestCS) and specifically the :

SetScrolls() function. The function example shows how to change the scale.

If this is not what you need please explain what product of ours you specifically wish to use.

Thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

igorg
User
Posts: 38
Joined: Thu Nov 30, 2006 7:51 am

Post by igorg » Tue Jul 03, 2007 6:59 am

I want to modify the PDF page permanently using the XCPRO35.dll and library functions previously mentioned . and if you can send me some code example how to use this functions to scaling the page .

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Jul 03, 2007 9:20 pm

Hi,

Please see below:

+++++++++++++


The XCPro35_Declares.cs file that is included in XCPro35Demo contains C# declarations for functions from xcpro35.dll. you will need to add this declaration for PXCp_TransformPage function :

// allow page transformation

[DllImport("xcpro35")] public static extern int PXCp_TransformPage(int pDocument, int PageNumber, ref PXC_Matrix matrix, int flags);

The function is easy in use. If it’s necessary to scale the PDF page to 90% (e.g. decrease on 10%) of original size then the matrix coefficients must be:

Matrix.a = 0.9;

Matrix.b = 0;

Matrix.c = 0;

Matrix.d = 0.9;

Matrix.e = 0;

Matrix.f = 0;

PXCp_TransformPage(pDocument, PageNumber, Matrix, 0);

+++++++++++

HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

igorg
User
Posts: 38
Joined: Thu Nov 30, 2006 7:51 am

Post by igorg » Thu Jul 05, 2007 9:13 am

Thank's a lot , how i can align to center the matrix ?

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Wed Jul 11, 2007 8:30 am

Hi,

You should use the Matrix.e and Matrix.f coefficients to position the scaled page (x and y coordinates) as appropriate.

HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply