Question about cropping page and set some print option

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

adntES
User
Posts: 71
Joined: Fri Mar 25, 2011 5:43 pm

Question about cropping page and set some print option

Post by adntES »

Hi guys, i am trying to crop a page from programming side.
Here is the execute command i try to crop the page at left but it doesn't work.

Code: Select all

AxPDFXviewer.DoDocumentVerb(m_ActiveDocId, "Pages[0].CropBox.Left", "SET", 5, Nothing) 
Is there something i do wrong?


Plus, i would like to set an options for the print document "Choose paper source by PDF-page size"
I just don't know what command to use.. could you provide me a small example?

Thanks !
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Question about cropping page and set some print option

Post by Corwin - Tracker Sup »

Hello adntES,

In current version of Viewer there is no way to set page crop by code.
i would like to set an options for the print document "Choose paper source by PDF-page size"
To do this you may set "Print.ScaleSimple.PaperByPage" property to true.

HTH.
adntES
User
Posts: 71
Joined: Fri Mar 25, 2011 5:43 pm

Re: Question about cropping page and set some print option

Post by adntES »

Corwin - Tracker Sup wrote:Hello adntES,

In current version of Viewer there is no way to set page crop by code.
i would like to set an options for the print document "Choose paper source by PDF-page size"
To do this you may set "Print.ScaleSimple.PaperByPage" property to true.

HTH.
Since we can't crop page by programming is there a way to modified the top margin and left margin by programming before printing??
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Question about cropping page and set some print option

Post by Vasyl - PDF-XChange »

Hi, adntES.

Its impossible in current implementation. You will be able to do it in the new version V3 (under construction).

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
adntES
User
Posts: 71
Joined: Fri Mar 25, 2011 5:43 pm

Re: Question about cropping page and set some print option

Post by adntES »

Do you have any alternative way to achieve this ?? like moving the field top or left..
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Question about cropping page and set some print option

Post by Vasyl - PDF-XChange »

Hi, adntES.

Do you want to remove white page margins before printing? You can do it by:

Code: Select all

ctrl.DoVerb('', 'ExecuteCommand', "RemoveWhiteSpaces", 0, 0); // will remove white margins from all pages
If not - look to other our SDK (https://www.pdf-xchange.com/product ... ge-pro-sdk) - it will allow you to change any pdf as you wanted.

HTH.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
adntES
User
Posts: 71
Joined: Fri Mar 25, 2011 5:43 pm

Re: Question about cropping page and set some print option

Post by adntES »

Vasyl-Tracker Dev Team wrote:Hi, adntES.

Do you want to remove white page margins before printing? You can do it by:

Code: Select all

ctrl.DoVerb('', 'ExecuteCommand', "RemoveWhiteSpaces", 0, 0); // will remove white margins from all pages
If not - look to other our SDK (https://www.pdf-xchange.com/product ... ge-pro-sdk) - it will allow you to change any pdf as you wanted.

HTH.
Hi Vasyl, well is there a way to add white space at top or left ?.. We want this because we are working with dot matrix document. So we need to print with form data only which is already done. However the marging need to be set so the user don't have to set the printer for a particular document. So if there is any way i can add any margin like white rectangle, change all formfield position or adding white space PLEASE let me know. It is very important for us !

thanks
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3586
Joined: Thu Jul 08, 2004 10:36 pm

Re: Question about cropping page and set some print option

Post by Ivan - Tracker Software »

No, there are no way to specify page position during printing, or add white space for the page.
PDF-XChange Co Ltd. (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.