[xep-support] Differences in transformation to postscript and PDF

Alexander Peshkov peshkov at renderx.com
Mon Apr 5 06:22:58 PDT 2004


Hello Egbert,

In order to make any suggestions we need more information about the
problem. Could you please send us (at support at renderx.com) XSL-FO
document that produces described effect along with PDF and PostScript
produced from it. 

Best regards,
Alexander Peshkov                             mailto:peshkov at renderx.com
RenderX


EKwn> Hi,

EKwn> I use XEP with VB6 to transform XMLFO to PDF and PostScript. I use the following code:

EKwn> Public Function Transform2PS(ByVal pstrXMLFO As String) As Byte()
EKwn> '##BD This function takes an XML FO document as input and transforms this to a stream in ps format.
EKwn> '##PD pstrXMLFO Valid XML FO Document to be transformed.
EKwn> '##RD Returns binary data containing PostScript document

EKwn>     Dim oXepTransformer As XEPLib.IXEPFormatter
EKwn>     Dim strDiag As String
    
EKwn> On Error GoTo ErrorHandler
    
EKwn>     'Create Object
EKwn>     Set oXepTransformer = CreateObject("XEP.XEPFormatter")
EKwn>     'Set output type
EKwn>      oXepTransformer.setOutputFormat "PostScript"
EKwn>     'Transform the XML-FO
EKwn>     Transform2PS = oXepTransformer.render(pstrXMLFO)
    
EKwn>     'Log diagnostic
EKwn>     strDiag = oXepTransformer.getDiagnostic
EKwn>     If (strDiag <> "") And mblnTracing Then
EKwn>         'Log the event to the event log
EKwn>         Call App.LogEvent(TypeName(Me) & ", Logging Diagnostics: " & strDiag, vbLogEventTypeInformation)
EKwn>     End If

EKwn>     Set oXepTransformer = Nothing
    
EKwn>     Exit Function
EKwn> ErrorHandler:
EKwn>     Set oXepTransformer = Nothing
EKwn>     Err.Raise Err.Number, "Transform2PS Function", _
EKwn>         Err.Description, Err.HelpFile, Err.HelpContext
EKwn> End Function

EKwn> Public Function Transform2PDF(ByVal pstrXMLFO As String) As Byte()
EKwn> '##BD This function takes an XML FO document as input and transforms this to a stream in pdf format.
EKwn> '##PD pstrXMLFO Valid XML FO Document to be transformed.
EKwn> '##RD Returns binary data containing pdf document
EKwn> On Error GoTo ErrorHandler
    
EKwn>     Dim strDiag As String
EKwn>     Dim oXepTransformer As XEPLib.IXEPFormatter
    
EKwn> On Error GoTo ErrorHandler
    
EKwn>     'Create the object
EKwn>     Set oXepTransformer = CreateObject("XEP.XEPFormatter")
EKwn>     'Set the output type
EKwn>     oXepTransformer.setOutputFormat "PDF"
EKwn>     Transform2PDF = oXepTransformer.render(pstrXMLFO)
 
EKwn>     'Log diagnostic
EKwn>     strDiag = oXepTransformer.getDiagnostic
EKwn>     If (strDiag <> "") And mblnTracing Then
EKwn>         'Log to the event log
EKwn>         Call App.LogEvent(TypeName(Me) & ", Logging Diagnostics: " & strDiag, vbLogEventTypeInformation)
EKwn>     End If
    
EKwn>     Set oXepTransformer = Nothing
    
EKwn>     Exit Function
EKwn> ErrorHandler:
EKwn>     Set oXepTransformer = Nothing
EKwn>     Err.Raise Err.Number, "Transform2PDF Function", _
EKwn>         Err.Description, Err.HelpFile, Err.HelpContext
EKwn> End Function

EKwn> 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
EKwn> outlined as I wanted. If the transformation is done to Postscript then the text is shift upward (5mm) en more to the left (2mm).

EKwn> 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.

EKwn> We have installed XEP 3.7.3.
EKwn> How can we solve this problem?

EKwn> Use different XSL-FO's is no option.

EKwn> Met vriendelijke groet, 

EKwn>                        Egbert Kluft

EKwn> Winterthur Verzekeringen
EKwn> Egbert Kluft, Teamleider Systeem Ontwikkeling Leven
EKwn> Prinses Irenestraat 33, P.O. Box 83000
EKwn> 1080 AA Amsterdam
EKwn> Phone +31 (0)20 5 411 785
EKwn> Fax +31 (0)20 6 428 428
EKwn> mailto:Egbert.Kluft at winterthur.nl


EKwn> -------------------
EKwn> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
EKwn> in the body of the message to majordomo at renderx.com from the address
EKwn> you are subscribed from.
EKwn> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html


-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at 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



More information about the Xep-support mailing list