Ejemplo n.º 1
0
        public void BeginInlineImage()
        {
            if (inlineImageBuilder != null && !isLenientParsing)
            {
                throw new PdfDocumentFormatException("Begin inline image (BI) command encountered while another inline image was active.");
            }

            inlineImageBuilder = new InlineImageBuilder();
        }
Ejemplo n.º 2
0
        public void BeginInlineImage()
        {
            if (inlineImageBuilder != null)
            {
                log?.Error("Begin inline image (BI) command encountered while another inline image was active.");
            }

            inlineImageBuilder = new InlineImageBuilder();
        }
Ejemplo n.º 3
0
        public void EndInlineImage(IReadOnlyList <byte> bytes)
        {
            if (inlineImageBuilder == null)
            {
                log?.Error("End inline image (EI) command encountered without a corresponding begin inline image (BI) command.");
                return;
            }

            inlineImageBuilder.Bytes = bytes;

            var image = inlineImageBuilder.CreateInlineImage(CurrentTransformationMatrix, filterProvider, pdfScanner, GetCurrentState().RenderingIntent, resourceStore);

            images.Add(Union <XObjectContentRecord, InlineImage> .Two(image));

            markedContentStack.AddImage(image);

            inlineImageBuilder = null;
        }
Ejemplo n.º 4
0
        public void EndInlineImage(IReadOnlyList <byte> bytes)
        {
            if (inlineImageBuilder == null)
            {
                if (isLenientParsing)
                {
                    return;
                }

                throw new PdfDocumentFormatException("End inline image (EI) command encountered without a corresponding begin inline image (BI) command.");
            }

            inlineImageBuilder.Bytes = bytes;

            var image = inlineImageBuilder.CreateInlineImage(CurrentTransformationMatrix, filterProvider, pdfScanner, GetCurrentState().RenderingIntent, resourceStore);

            images.Add(Union <XObjectContentRecord, InlineImage> .Two(image));

            inlineImageBuilder = null;
        }