473,511 Members | 16,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML-FO.clear() fails

2 New Member
Hi ,

I am using XML-FO for pdf formating purpose.

Wheneve i call clear method , it gives me com error and the description it gives is "NOT SET".

Here is the code :

Expand|Select|Wrap|Line Numbers
  1. IXFOObjPtr pAXFmt;
  2. EVAL_HR(pAXFmt.CreateInstance("AXFOSVR.XFOObj"),_T("FOProcessing tried to instantiate AXFOSVR.XFOObj"));
  3. assert(pAXFmt != NULL);
  4.  
  5. _tstring sFoTmpFile = GetTmpFOFileName(rsDestFile);
  6.  
  7. try
  8. {
  9.  
  10.     XSLHelper::ApplyXSLTransformation(pDocData,
  11.           pXSLDoc,
  12.           vParams,
  13.       sFoTmpFile.c_str());
  14.  
  15.         pAXFmt->Clear();
  16.         pAXFmt->Source = sFoTmpFile.c_str();
  17.  
  18.         pAXFmt->PrinterName="@PDF";
  19.         pAXFmt->OutputFile= rsDestFile.c_str(); 
  20.         pAXFmt->Execute();
  21.  
  22.         DeleteFile(sFoTmpFile.c_str());
  23.  
  24.         if(pAXFmt->GetErrorCode())
  25.         {
  26.             DumpFOError(pAXFmt);
  27.                                       throw Exception(_T("FO processor failed to format .fo file"),FILELINE);
  28.         }        
  29.     }
  30.     catch(_com_error& e)
  31.     {
  32.         DumpFOError(pAXFmt);
  33.         LogAdapter::Log(e,FILELINE);
  34.         DeleteFile(sFoTmpFile.c_str());
  35.  
  36.  
  37.         throw Exception(_T("Failed to format to PDF"),FILELINE);
  38.     }

This code is working in some machines properly but in one machine it is giving this com error.

Please suggest what can be the problem.

Thnx,
Kuldeep
Apr 27 '07 #1
4 1763
dorinbogdan
839 Recognized Expert Contributor
Welcome to TheScripts TSDN....

It looks like a C/C++ issue, so I will move the thread to C/C++ forum.

Dorin.
Apr 27 '07 #2
kuldeep78
2 New Member
Welcome to TheScripts TSDN....

It looks like a C/C++ issue, so I will move the thread to C/C++ forum.

Dorin.
I am not getting any reply to this post. Actually its an xml related issue. Can we move it again to XML section.
May 7 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Let me ask some experts in C/C++, and they will try to help as soon as possible.

Dorin.
May 7 '07 #4
Banfa
9,065 Recognized Expert Moderator Expert
Some initial questions spring to mind.

What are the differences between the machines that the code works on and the one that it doesn't? Are the input files different? Are the input files on the non-working machine valid?

Your description of the exception is a little sketchy. Are you sure the exception is caused by the call pAXFmt->Clear()? How do you know?
May 7 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1598
by: Joe Mowry | last post by:
First off, I'm posting this question for a friend that doesn't have access to the news groups. Problem: Using PHP as the base and has several PHP < includes > for various functions, all this...
0
1316
by: Philippe Poulard | last post by:
I don't know if anybody already designed an URN scheme for XML; here is a proposal: I call it the "XML URN Scheme", or XUS. ========= URNs are logical names used to identify resources. XUS...
2
1593
by: Dan Shookowsky | last post by:
I'm trying to write a schema that allows me to substitute entensions for a base type. The schema (included below) defines a StepType and an AnnouncementStepType that is an extension of the base...
3
6040
by: AFN | last post by:
I'm comfortable with VB.NET but new to XML. I am getting XML data from a remote machine across the internet. Sometimes my LoadXML call works fine and I parse out the data I need thereafter. ...
2
4172
by: Sujith Jagini | last post by:
Hi I am facing this strange problem, we are receiving xml documents from Siebel which I am trying to deserialize into class objects for further processing. The encoding of the document is...
28
2150
by: Andrew Poulos | last post by:
When loading an rss feed into Windows IE, doc.childNodes.length always equals 0. If I manually delete the <!DOCTYPE tag doc.childNodes.length is correct. I'm using doc = new...
7
1987
by: John Bowman | last post by:
Hi All, I'm fairly new to XML, so I presume I'm doing something obviously dense here, but here it goes. Below is an XML file that was extracted from a test Windows Installer .MSP (patch) file...
1
3022
by: foolproofplan | last post by:
I have a situation where I need to convert an xml file into two types of tables in html. I have never done anything like this before, so I have been reading up on it online. However, I am not 100...
1
4288
by: jaimemartin | last post by:
hello, I want to validate an xml by means of a schema (xsd). To do that first of all I´m using a SchemaFactory. The problem is that if I run the code in Windows all works fine, but If I run it in...
6
1188
by: Andy B | last post by:
I need to make sure that a file saved in a particular place is a valid xml file that fits a certain schema. Where would I get started doing this? The original file would have been created and saved...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.