Question

We have a PDF document which we want to convert to a TIF file. The pdf contains a box with a light gray background. When converting this gray turns into a black polygon in the tif. No matter what Rendering settings it will always be black. Is there anything what I can do to influence the rendering to TIF so this gray box does not turn into black? We use the following code:

        using ( Doc doc = new Doc() )
        {
            XReadOptions options = new XReadOptions { ReadModule = ReadModuleType.Pdf };

            doc.Read( bytes, options );

            using ( MemoryStream ms = new MemoryStream() )
            {
                int n = doc.PageCount;
                for ( int i = 1; i <= 1; i++ )
                {
                    doc.PageNumber = i;

                    doc.Rect.String = doc.CropBox.String;
                    doc.Rendering.SaveAppend = ( i != 1 );

                    doc.Rendering.Save( "out.tif", ms );
                }

                byte[] tifBytes = ms.GetBuffer();
                File.WriteAllBytes( string.Format( @"{0}\total.tif", workingFolder), tifBytes );
            }
        }
Was it helpful?

Solution

Beside this question we asked for support at WebSuperGoo. A new release which will be released soon will fix this issue. Seems we were not doing anything wrong.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top