Print a page and the size in the preview is to small (tump nail)

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Print a page and the size in the preview is to small (tump nail)

Post by rlcgm »

Hello,
I have a little problem and I need support:
I want to print a pdf document and the size of the page is A4. The print-out of the page is like a thump nail. But that is wrong. The MFC demo app has the same problem and the preview and the print-out have the same wrong size.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Print a page and the size in the preview is to small (tump nail)

Post by Sasha - Tracker Dev Team »

Hello rlcgm,

Please show a piece of code that you are using for this.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Re: Print a page and the size in the preview is to small (tump nail)

Post by rlcgm »

Hello Alex,

in the MFC c++ demo, the same problem is included. Use the print demo in the MFC App and open a pdf file and print is out or look at the preview. The original PDF File is in A4 the print out is much smaller.

Cheers
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Print a page and the size in the preview is to small (tump nail)

Post by Sasha - Tracker Dev Team »

Hello rlcgm,

We've found a solution to your problem.
The thing is that the dm matrix in this call is not needed:

Code: Select all

pPage->DrawToDevice((PXC::HANDLE_T)pdlg.hDC, DrawRect, &dm, PXC::DDF_AsVector, nullptr, pROpt, nullptr); 
Pass nullptr instead and it will work for you.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Re: Print a page and the size in the preview is to small (tump nail)

Post by rlcgm »

Hallo Alex,

this is line from the MFC sample and is not works. Sorry.

Cheers
rlcgm
User
Posts: 38
Joined: Thu Jun 10, 2021 11:00 am

Re: Print a page and the size in the preview is to small (tump nail)

Post by rlcgm »

Hallo Alex,

sorry, i replace the dm with nullptr and then it works. Many thanks.

Cheers
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Print a page and the size in the preview is to small (tump nail)

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply