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.
Still getting watermark on PDF
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- 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
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:
Similarly, the same is true for Raster-XChange too.
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);
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.
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.
Re: Still getting watermark on PDF
That's it...problem solved! Thanks for the help!
- 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
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
Best regards
Tracker Support
http://www.tracker-software.com