Skip to end of metadata
Go to start of metadata
Contents Summary
 

Following are some methods and Operations used in GroupDocs.Conversion API examples to Elaborate the Working of Documents Conversion to PDF formats where you can get the output as converted file as Path, Stream and use more advance conversion options

The source code in below examples uses some methods defined in Working with Common Operations

Convert and Get File Path

Convert a document/file to PDF format and get output as file path. When converting to a PDF document you can set PDF formatting options. You can set following formats using PdfFormatingOptions:

  • PdfPageMode
  • PdfPageLayout
  • PdfDirection

 

Convert and Get IO Stream

Converts documents to PDF Document formats and outputs the resulting document to a stream

Convert with Advance Options and Get File Path

In advance options example Convert Password Protected file to PDF format and outputs the resulting document to File Path

Convert with Advance Options and Get IO Stream

In advance options example Convert Password Protected file to PDF format and outputs the resulting document to a stream

Hide Comments when Converting

The Recipe

  • Setup conversion configuration
  • Create an object saveOptions of class PdfSaveOptions
  • Set setHideWordComments property to false
  • Save result 

The Code

Convert XML-FO/XSL to PDF

The Recipe

  • Setup conversion configuration
  • Create an object saveOptions of class PdfSaveOptions
  • Set XmlLoadOptions
  • Save result 

The Code

Rotate Pages when Converting

The Recipe

  • Setup conversion configuration
  • Instantiate PdfSaveOptions
  • Set setRotate property to PdfSaveOptions.Rotation.On90
  • Save result 

The Code

Usage of PageMode

The Recipe

  • Setup conversion configuration
  • Create an object saveOptions of class PdfSaveOptions
  • Set page mode to true
  • Save resultant paths 

The Code

Labels
  • No labels