Home
 
The page you are viewing is part of our 160,000 page PDF discussion forum archive spanning 1999-2011.
Go to the new Planet PDF forum to join the PDF community.
 

Search
 Advanced   
Sign up for a WebBoard account Archive Forum Home


PLATINUM
SPONSOR

GOLD
SPONSORS



Topic  
Go to previous topicPrev TopicGo to next topicNext Topic
Author Message
akashag1001
akashag1001

Total Messages 6

Subject:PDF prinitng using PDFlib

Hi,

I am using PDFlib to process and print PDF. But I didn't get function which exposed printing of PDF.

I wrote this code but got an exception that this function create_action() can not be used in object scope.

Can someone please help.

Thanks,
Akash


int print()
{
/* This is where the data files are. Adjust as necessary. */
string searchpath = "../../data";

PDFlib *p;
p = new PDFlib();
string pdfinput = "e:\\work\\2.pdf";

string docoptlist = "requiredmode=minimum infomode=true password=akash";
int count, pcosmode;
int i, doc;
string objtype;

// This means we must check return values of load_font() etc.
p->set_parameter("errorpolicy", "return");

p->set_parameter("SearchPath", searchpath);

/* We do not create any output document, so no call to
* begin_document() is required.
*/

/* Open the input document */
if ((doc = p->open_pdi_document(pdfinput, docoptlist)) == -1) {
cerr << "Error: " << p->get_errmsg() << endl;
return 2;
}

p->create_action("Launch", "print");
/* --------- general information (always available) */

}


Posted: 12 Mar 2009 11:24 PM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
bmarch
bmarch

Total Messages 710

Subject:RE:printing using PDFlib

PDFlib is a PDF creation api - you are using the wrong tool if all you
want to do is print.

creation_action() is typically used to embed a Javascript into the PDF...


--
*Ben Marchbanks*

www.magazooms.com
Signature
Email: ben@magazooms.com
Phone: (864) 284.9918


Posted: 12 Mar 2009 11:34 PM
Left Button SpacerView user's profile profileRight Button Spacer
 
 
   
Go to previous topicPrev TopicGo to next topicNext Topic

go




Top | News | Developer | Find PDF Tools | Sponsorship | Tips | Home



Debenu's Planet PDF - a comprehensive site exclusively focused on Adobe Acrobat/PDF users and uses. Debenu's Planet PDF - Resources for Adobe Acrobat and PDF users

Please post PDF-related questions to our Planet PDF Forum forums.planetpdf.com. To send comments about this site please visit our contact page.
Planet PDF, Planet PDF Forum, PDF SDK - Debenu Quick PDF Library and Debenu are all copyright
© 2011 Debenu Pty Ltd.. All Rights Reserved. Privacy policy.