Still getting watermark on PDF

PDF-XChange Drivers API (only) V4/V5
This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - VERSION 4 & 5 - Please use the PDF-Tools SDK Forum for Library DLL assistance.

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

Post Reply
71SoCal
User
Posts: 21
Joined: Fri Jul 31, 2009 9:50 pm

Still getting watermark on PDF

Post by 71SoCal »

Below is my initialization for PDF:

#include "stdafx.h"
#include "trackerpdfimagedriver.h"

bool TrackerPDFImageDriver::InitializeDriver()
{
m_pFactory = PXC::IPXCControlExPtr(__uuidof(PXC::CPXCControlEx));
if (m_pFactory == NULL)
return false;

if (m_pPrinter == NULL)
{
m_pPrinter = m_pFactory->Printer[L"", L"PDF-XChange 4.0", L"Reg Code Hidden", L"Dev Code Hidden"];
if (m_pPrinter == NULL)
return false;
}

m_pPrinter->ResetDefaults();
m_pPrinter->Option["Save.SaveType"] = "Save";
m_pPrinter->Option["Save.ShowSaveDialog"] = "No";
m_pPrinter->Option["Save.File"] = (const char*)GetImageFileFullPath();
m_pPrinter->Option["Save.WhenExists"] = "Overwrite";
m_pPrinter->Option["Save.RunApp"] = 0;
m_pPrinter->Option["Overlay.Enabled"] = 0;
m_pPrinter->Option["Compression.Graphics"] = 0;
m_pPrinter->Option["Compression.Text"] = 0;
m_pPrinter->Option["Fonts.EmbedAll"] = 1;
m_pPrinter->ApplyOptions(0);

SetDriverName("PDF-XChange 4.0");
return true;
}


I'm acutally having a similar problem with the Raster driver as well. But for now I'm concentrating on the PDF.


Any help would be appreciated.
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Still getting watermark on PDF

Post by Ivan - Tracker Software »

Looks like the problem is in your routine SetDriverName - setting up the printer to be used by your application for printing.

There is one note -- if in your system there is already the printer the with name specified into the call m_pPrinter = m_pFactory->Printer[L"", L"PDF-XChange 4.0", L"Reg Code Hidden", L"Dev Code Hidden"];, the newly created printer will have a different name than that which was specified int the call.

So, instead of using a hardcoded printer name in the call SetDriverName, you need to use property Name of m_pPrinter:

Code: Select all

SetDriverName(m_pPrinter->Name);
Similarly, the same is true for Raster-XChange too.
Tracker Software (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.
71SoCal
User
Posts: 21
Joined: Fri Jul 31, 2009 9:50 pm

Re: Still getting watermark on PDF

Post by 71SoCal »

That's it...problem solved! Thanks for the help!
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: Still getting watermark on PDF

Post by John - Tracker Supp »

Pleasure - pleased all is now well :)
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