Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8839541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:15:35+00:00 2026-06-14T10:15:35+00:00

I’ve seen some ABCpdf questions on this site but not this one yet. I

  • 0

I’ve seen some ABCpdf questions on this site but not this one yet. I am working on a project that requires PDF output with some rather specific options. ABCpdf seems to be able to offer this through their API but the documentation is confusing and/or incomplete.

using (var xpsStream = (MemoryStream)xps.Write(doc))
{
    xpsStream.Position = 0;
    pdfDoc.Clear();

    pdfDoc.Read(xpsStream, new XReadOptions
    {
        FileExtension = "xps"
    });

    pdfDoc.Rendering.DotsPerInch = 72;
    pdfDoc.Rendering.ColorSpace = XRendering.ColorSpaceType.Cmyk;
    pdfDoc.Rendering.IccCmyk = "device";

    pdfDoc.Save(stream);
}

This renders a PDF that does not come across with the set rendering properties. The documentation does state that in order to save the rendering properties they must be saved via the Save() method in the XRendering class. So I would have to do something like:

    pdfDoc.Rendering.DotsPerInch = 72;
    pdfDoc.Rendering.ColorSpace = XRendering.ColorSpaceType.Cmyk;
    pdfDoc.Rendering.IccCmyk = "device";
    pdfDoc.Rendering.Save("blah", stream);   // they want a "name" argument

The name argument in their documentation is described as “A dummy file name used to determine the type of image required.” Later they say “The file name extensions which may be used are .TIF, .TIFF, .JPG, .GIF, .PNG, .BMP, .JP2, .EMF, .PS and .EPS.“

Then after the latter version of the code runs, I do get output but it is not PDF, it is either TIF, JPG, or whatever I choose from that list. If I say ‘mom.pdf’ it throws an error. This is terrible because this is the way they beging the description of the Save() method in XRendering is “Use this method to render the PDF.“

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:15:36+00:00Added an answer on June 14, 2026 at 10:15 am

    There are two different things here.

    1) The Doc.Save method which saves the document in PDF, XPS or other similar document format.

    2) The Doc.Rendering.Save which renders the current section of the current page to an image format like TIFF or JPEG.

    The Doc.Rendering properties are used to control the rendering. Not saving the Doc.

    For control over saving the Doc you want the Doc.SaveOptions.

    You cannot mix and match the two.

    So…

    It seems to me from your code, that what you are trying to do is to import an XPS document and convert it to CMYK.

    The way to do this is to change the color space of the document before you save it using Doc.Save.

    To change the color space of the PDF you need to use the RecolorOperation class. This will allow you to change the color space of your document to RGB, CMYK, Grayscale, ICC / ICM or indeed whatever you fancy.

    If I am wrong then presumably you want CMYK output in TIFF, JPEG, JPEG 2000, PSD or similar. To do that you need to use the doc.Rendering options to control the color space and bit depth (either 8 or 16 bits per component) and then call doc.Rendering.Save.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
This could be a duplicate question, but I have no idea what search terms
I need a function that will clean a strings' special characters. I do NOT
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.