Printing to PDF-XChange and saving output as bitmap

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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
ThomasGibson
User
Posts: 10
Joined: Tue Sep 22, 2009 9:47 pm

Printing to PDF-XChange and saving output as bitmap

Post by ThomasGibson » Tue Sep 22, 2009 11:55 pm

I have been trying to print to PDF-Xchange from within our application and then to save the printed output to a file as a bitmap. Lines and boxes drawn on the driver device context appear in the bitmap, but text does not. Any ideas what I am doing wrong?

Thanks.

Thomas Gibson
SFREP

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

Re: Printing to PDF-XChange and saving output as bitmap

Post by Corwin - Tracker Sup » Wed Sep 23, 2009 1:10 pm

Hello Thomas,

How exactly you have tried to save printed output (I suppose PDF file) to bitmap?

ThomasGibson
User
Posts: 10
Joined: Tue Sep 22, 2009 9:47 pm

Re: Printing to PDF-XChange and saving output as bitmap

Post by ThomasGibson » Wed Sep 23, 2009 4:27 pm

What I've done with other printers is to:

Open the printer:
Get the document properties:
Change the resolution to 150 DPI (both horizontal and vertical):
Create a device context for the printer
Create a memory device context compatible to the printer context
Create a compatible bitmap and select it into the memory device context
Draw on the device context
Save the bitmap to a file.

What is different about PDF-XChange?

Thomas Gibson

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

Re: Printing to PDF-XChange and saving output as bitmap

Post by Corwin - Tracker Sup » Wed Sep 23, 2009 5:41 pm

Can you give us an example project, so we can reproduce your problem here?

User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13324
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Printing to PDF-XChange and saving output as bitmap

Post by Tracker Supp-Stefan » Thu Sep 24, 2009 9:40 am

Hi Thomas,

And Please make sure your serial and developer codes are removed from the attached files.

Stefan

ThomasGibson
User
Posts: 10
Joined: Tue Sep 22, 2009 9:47 pm

Re: Printing to PDF-XChange and saving output as bitmap

Post by ThomasGibson » Fri Sep 25, 2009 3:56 pm

Here is a VC++ 6.0 test project. It tries to draw a circle with the letters SFREP printed centered within the circle. It works with PDF995, but not with PDF-XChange. I've included the output files, 995.BMP and XCng.BMP, so you can see what I mean. If you need a PDF995 install, there is a free demo install at http://www.pdf995.com/download.html. You will need to download both the 2.5MB driver installer and the 9.1 MB converter installer.

Thank you for your help.

Thomas Gibson
SFREP
Sylva, NC
Attachments
PrintTest.zip
(19.83 KiB) Downloaded 220 times

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

Re: Printing to PDF-XChange and saving output as bitmap

Post by Corwin - Tracker Sup » Fri Sep 25, 2009 5:45 pm

Can you try to use the CreateFont function (using Arial font, for example) instead of GetStockObject(SYSTEM_FONT) ?

ThomasGibson
User
Posts: 10
Joined: Tue Sep 22, 2009 9:47 pm

Re: Printing to PDF-XChange and saving output as bitmap

Post by ThomasGibson » Fri Sep 25, 2009 6:09 pm

I did. There was still no text when using PDF-XChange.

I substituted:
HFONT hFont = CreateFont(39, 19, 0, 0, 400, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_CHARACTER_PRECIS,
CLIP_DEFAULT_PRECIS, PROOF_QUALITY,
FF_DONTCARE | DEFAULT_PITCH , "Arial");
HFONT hOldFont = (HFONT) SelectObject(hdcMem, hFont);

for

SelectObject(hdcMem, GetStockObject(SYSTEM_FONT));

Thomas Gibson

Post Reply