Hello!

I recently updated from 0.8.1 to 0.9.1, and now following piece of code 
isnt working anymore:

PdfMemDocument doc( gKuehlRetourForm );
PdfPage* pPage = doc.GetPage(0);
int nFieldCount  = pPage->GetNumFields();
        for( int n=0;n<nFieldCount;n++ )        {
                PdfField  field = pPage->GetField( n );
                EPdfField eType = field.GetType();
                if (eType == ePdfField_TextField) {
                       CString sFieldName( field.GetFieldName().GetString());
                        PdfTextField tf(field);
                        if (sFieldName == _T("name")) {
                                PdfString cstr(_T("fucking hell..."));
                                tf.SetText(cstr);
                        }
                }
        }
CString sTmpPDF(gKuehlRetourForm);
sTmpPDF.Replace(_T(".pdf"), _T("1.pdf"));
doc.Write( sTmpPDF );


the pdf file is a form, and i want to alter the form fields.
the new file is written, but the fields where not altered.
there are no errors from any functions.

any hint what i do wrong would be highly appreciated!

thanks!
Stefan Binder

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to