PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Resources Key is missing in the page object for empty pages
https://forum.pdfsharp.net/viewtopic.php?f=3&t=607
Page 1 of 1

Author:  Fish [ Tue Jan 13, 2009 4:12 pm ]
Post subject:  Resources Key is missing in the page object for empty pages

Hi,

first of all: You have done a great job.

My PDF documents use some empty pages. Viewing them with Acrobat is not a problem but some
other tools are more strict when processing the PDF. Empty pages create an error message which
says that the page is missing the resources dictionary.
PDFsharp doesn't add an emtpy dictionary (/Resources<<>>) if the page is empty.

If I understand the PDF reference (see below) this is required.

TABLE 3.27 Entries in a page object
Key = Resources
Type = dictionary
(Required; inheritable) A dictionary containing any resources required by
the page (see Section 3.7.2, “Resource Dictionaries”).
If the page requires no resources, the value of this entry should be an empty dictionary.
Omitting the entry entirely indicates that the resources are to be inherited from an ancestor node in the page tree.

Regards

Author:  Soldier-B [ Tue Jan 13, 2009 8:11 pm ]
Post subject:  Re: Resources Key is missing in the page object for empty pa

Fish wrote:
Omitting the entry entirely indicates that the resources are to be inherited from an ancestor node in the page tree.


As you quoted from the pdf spec, if a page doesn't have a resource dictionary its to be assumed the page's resources are inherited from a parent node.

Acrobat doesn't have an issue with this (obviously because Adobe knows how to properly adhere to their own spec), on the other hand not all third party apps follow the spec 100%.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/