module PIM::Services::FopService

Public Instance Methods

__fop_service() click to toggle source
# File services.rb, line 1434
def __fop_service
  __service(:fopService)
end
create_pdf_from_fo(fo_content_or_stream, pdf_path_or_stream, gathering_key = nil) click to toggle source
# File services.rb, line 1395
def create_pdf_from_fo fo_content_or_stream, pdf_path_or_stream, gathering_key = nil

  fo_content_or_stream = to_inputstream(fo_content_or_stream)
  pdf_path_or_stream = to_outputstream(pdf_path_or_stream)

  if pdf_path_or_stream.is_a?(String)
    asset = __fop_service.create_pdf_from_fo(fo_content_or_stream, pdf_path_or_stream, gathering_key)
  else
    asset = __fop_service.create_pdf_from_fo(fo_content_or_stream, pdf_path_or_stream)
  end

  return asset
end
create_pdf_from_xslt(xslt_path_or_stream, xml_content_or_stream, pdf_path_or_stream, gathering_key = nil) click to toggle source
# File services.rb, line 1409
def create_pdf_from_xslt xslt_path_or_stream, xml_content_or_stream, pdf_path_or_stream, gathering_key = nil

  xslt_path_or_stream = to_inputstream(xslt_path_or_stream)
  xml_content_or_stream = to_inputstream(xml_content_or_stream)
  pdf_path_or_stream = to_outputstream(pdf_path_or_stream)

  if pdf_path_or_stream.is_a?(String)
    asset = __fop_service.create_pdf_from_xslt(xslt_path_or_stream, xml_content_or_stream, pdf_path_or_stream, gathering_key)
  else
    asset = __fop_service.create_pdf_from_xslt(xslt_path_or_stream, xml_content_or_stream, pdf_path_or_stream)
  end

  return asset
end
to_inputstream(value) click to toggle source
# File services.rb, line 1424
def to_inputstream value
  return value.to_inputstream if value.respond_to?(:to_inputstream)
  return value
end
to_outputstream(value) click to toggle source
# File services.rb, line 1429
def to_outputstream value
  return value.to_outputstream if value.respond_to?(:to_outputstream)
  return value
end