Convert Tiff to PDF in C#

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
kevinxgao
User
Posts: 3
Joined: Mon Apr 11, 2005 8:48 pm

Convert Tiff to PDF in C#

Post by kevinxgao » Mon Apr 11, 2005 8:54 pm

We are writing a prototype program with PDF Tools SDK before purchasing. Could you send me a demo code of converting tiff to PDF file? This will greatly speed up our evaluation process and also help our project.

We are using C# as development tool.

We really appreciate your help.
Best regards,
Kevin Gao

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Apr 12, 2005 1:47 pm

Hi Kevin,

there is already a C# demo showing how to convert Images2PDF - amongst other functions :

Please see the example application code in the installation folder :

x:\Program Files\Tracker Software\PDF-XChange PRO 3 SDK\Examples\SDKExamples\C#Examples\PDFXC

You can modify these quite simply to use the file format(s) and image file names/location you wish to use - once amended and compiled copy this to the \Bin folder to ensure you have all the dll's required and run - or use the attached precompiled example and copy to the Bin folder and see how the default handles some standard image types.

Hope that helps
Attachments
CSharpPXC3Demo.zip
C# demo
(32.93 KiB) Downloaded 97 times
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

kevinxgao
User
Posts: 3
Joined: Mon Apr 11, 2005 8:48 pm

Post by kevinxgao » Tue Apr 12, 2005 2:11 pm

Thank you very much. I did not run this one. I will try now.
Best regards,
Kevin Gao

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Apr 12, 2005 2:41 pm

Pleasure - but please be advised I think in the available SDK there is an error in the compiled exe (not the source code) - so please do use the exe posted above.

thanks
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

kevinxgao
User
Posts: 3
Joined: Mon Apr 11, 2005 8:48 pm

Post by kevinxgao » Tue Apr 12, 2005 2:54 pm

Hi John,

I looked the demo "PDFXC". It is pretty good. I looked into source code, too. However, I could not find how to define the source image (file name and fine path). In the source code, it clearly defined target file path and file name.

"string fname = @"..\OutFiles\sdk3test.pdf";"

Could you tell me how to define source name? Once I get this, we will be able to put the code together for testing.

Once more question (this is not critical to us), is it able to convert Microsoft word document or Word Perfect document.

Thank you so much for your help.

-- Kevin
Best regards,
Kevin Gao

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Tue Apr 12, 2005 3:36 pm

Hi,

Please see the code file ex_images.cs and locate the function PXC_AddImageA. It get's the 2-nd parameter IMG_NAME which is a string constant.

For this and other constants see the top of the file for the code:

const string IMG_NAME = "..\\TestFiles\\orig.gif";
const string IMG_NAME2 = "..\\TestFiles\\rabbit.gif";
const string MASK_NAME = "..\\TestFiles\\mask.gif";
const string META_NAME = "..\\TestFiles\\page1.wmf";

so as you can see the source image files are derived from the TestFiles folder and retrieves the appropriate image file names as above.
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