From: Egbert.Kluft@winterthur.nl
Date: Mon Apr 05 2004 - 05:08:12 PDT
Hi,
I use XEP with VB6 to transform XMLFO to PDF and PostScript. I use the following code:
Public Function Transform2PS(ByVal pstrXMLFO As String) As Byte()
'##BD This function takes an XML FO document as input and transforms this to a stream in ps format.
'##PD pstrXMLFO Valid XML FO Document to be transformed.
'##RD Returns binary data containing PostScript document
    Dim oXepTransformer As XEPLib.IXEPFormatter
    Dim strDiag As String
    
On Error GoTo ErrorHandler
    
    'Create Object
    Set oXepTransformer = CreateObject("XEP.XEPFormatter")
    'Set output type
     oXepTransformer.setOutputFormat "PostScript"
    'Transform the XML-FO
    Transform2PS = oXepTransformer.render(pstrXMLFO)
    
    'Log diagnostic
    strDiag = oXepTransformer.getDiagnostic
    If (strDiag <> "") And mblnTracing Then
        'Log the event to the event log
        Call App.LogEvent(TypeName(Me) & ", Logging Diagnostics: " & strDiag, vbLogEventTypeInformation)
    End If
    Set oXepTransformer = Nothing
    
    Exit Function
ErrorHandler:
    Set oXepTransformer = Nothing
    Err.Raise Err.Number, "Transform2PS Function", _
        Err.Description, Err.HelpFile, Err.HelpContext
End Function
Public Function Transform2PDF(ByVal pstrXMLFO As String) As Byte()
'##BD This function takes an XML FO document as input and transforms this to a stream in pdf format.
'##PD pstrXMLFO Valid XML FO Document to be transformed.
'##RD Returns binary data containing pdf document
On Error GoTo ErrorHandler
    
    Dim strDiag As String
    Dim oXepTransformer As XEPLib.IXEPFormatter
    
On Error GoTo ErrorHandler
    
    'Create the object
    Set oXepTransformer = CreateObject("XEP.XEPFormatter")
    'Set the output type
    oXepTransformer.setOutputFormat "PDF"
    Transform2PDF = oXepTransformer.render(pstrXMLFO)
 
    'Log diagnostic
    strDiag = oXepTransformer.getDiagnostic
    If (strDiag <> "") And mblnTracing Then
        'Log to the event log
        Call App.LogEvent(TypeName(Me) & ", Logging Diagnostics: " & strDiag, vbLogEventTypeInformation)
    End If
    
    Set oXepTransformer = Nothing
    
    Exit Function
ErrorHandler:
    Set oXepTransformer = Nothing
    Err.Raise Err.Number, "Transform2PDF Function", _
        Err.Description, Err.HelpFile, Err.HelpContext
End Function
I need to print text under a logo of my company. The text is outlined in the region-before section with a table (we use cm for spacing). If I transform the XMLFO to PDF then the text is outlined as I wanted. If the transformation is done to Postscript then the text is shift upward (5mm) en more to the left (2mm).
We use Postscript to print directly from server to the printer and PDF to show the letter to the user. The user can decide to print of not.
We have installed XEP 3.7.3.
How can we solve this problem?
Use different XSL-FO's is no option.
Met vriendelijke groet, 
                       Egbert Kluft
Winterthur Verzekeringen
Egbert Kluft, Teamleider Systeem Ontwikkeling Leven
Prinses Irenestraat 33, P.O. Box 83000
1080 AA Amsterdam
Phone +31 (0)20 5 411 785
Fax +31 (0)20 6 428 428
mailto:Egbert.Kluft@winterthur.nl
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Mon Apr 05 2004 - 05:14:10 PDT