Load page description language document with options
Leave feedback
On this page
GroupDocs.Conversion provides PageDescriptionLanguageLoadOptions to control how source page description language (PDL) documents are processed. PDL documents include formats like XPS, SVG, EPS, PostScript (PS), TEX, and PCL.
The following options are available:
| Option | Description |
|---|---|
| Format | The document type is auto-detected during loading, but you can explicitly specify the source format. Available options include: Xps, Eps, Svg, Ps, Tex, Pcl, Cgm, Oxps |
The following code snippet shows how to load an XPS document with explicit format specification:
With v24.10 and later:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Xps
};
using (Converter converter = new Converter("document.xps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("document.pdf", options);
}
Before v24.10:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadOptions> getLoadOptions = () => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Xps
};
using (Converter converter = new Converter("document.xps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("document.pdf", options);
}
The following code snippet shows how to load an EPS (Encapsulated PostScript) document:
With v24.10 and later:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Eps
};
using (Converter converter = new Converter("vector-graphic.eps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("vector-graphic.pdf", options);
}
Before v24.10:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadOptions> getLoadOptions = () => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Eps
};
using (Converter converter = new Converter("vector-graphic.eps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("vector-graphic.pdf", options);
}
The following code snippet shows how to load a PostScript (PS) document:
With v24.10 and later:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Ps
};
using (Converter converter = new Converter("print-file.ps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("print-file.pdf", options);
}
Before v24.10:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadOptions> getLoadOptions = () => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Ps
};
using (Converter converter = new Converter("print-file.ps", getLoadOptions))
{
PdfConvertOptions options = new PdfConvertOptions();
converter.Convert("print-file.pdf", options);
}
The following code snippet shows how to load an XPS document and convert it to SVG:
With v24.10 and later:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Xps
};
using (Converter converter = new Converter("layout.xps", getLoadOptions))
{
PageDescriptionLanguageConvertOptions options = new PageDescriptionLanguageConvertOptions
{
Format = PageDescriptionLanguageFileType.Svg
};
converter.Convert("layout.svg", options);
}
Before v24.10:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadOptions> getLoadOptions = () => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Xps
};
using (Converter converter = new Converter("layout.xps", getLoadOptions))
{
PageDescriptionLanguageConvertOptions options = new PageDescriptionLanguageConvertOptions
{
Format = PageDescriptionLanguageFileType.Svg
};
converter.Convert("layout.svg", options);
}
The following code snippet shows how to convert from EPS to SVG format:
With v24.10 and later:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Eps
};
using (Converter converter = new Converter("illustration.eps", getLoadOptions))
{
PageDescriptionLanguageConvertOptions options = new PageDescriptionLanguageConvertOptions
{
Format = PageDescriptionLanguageFileType.Svg
};
converter.Convert("illustration.svg", options);
}
Before v24.10:
using GroupDocs.Conversion;
using GroupDocs.Conversion.FileTypes;
using GroupDocs.Conversion.Options.Convert;
using GroupDocs.Conversion.Options.Load;
Func<LoadOptions> getLoadOptions = () => new PageDescriptionLanguageLoadOptions
{
Format = PageDescriptionLanguageFileType.Eps
};
using (Converter converter = new Converter("illustration.eps", getLoadOptions))
{
PageDescriptionLanguageConvertOptions options = new PageDescriptionLanguageConvertOptions
{
Format = PageDescriptionLanguageFileType.Svg
};
converter.Convert("illustration.svg", options);
}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.