{"id":78,"date":"2013-08-25T19:24:09","date_gmt":"2013-08-25T18:24:09","guid":{"rendered":"http:\/\/thedifficultbit.com\/?p=78"},"modified":"2013-12-19T00:56:35","modified_gmt":"2013-12-18T23:56:35","slug":"devexpress-rich-edit-document-server-photos-not-shown-in-pdfs","status":"publish","type":"post","link":"https:\/\/thedifficultbit.com\/?p=78","title":{"rendered":"DevExpress Rich Edit Document Server: Photos not shown in PDFs"},"content":{"rendered":"<p>DevExpress has a <a href=\"http:\/\/documentation.devexpress.com\/#DocumentServer\/clsDevExpressXtraRichEditRichEditDocumentServertopic\">Rich Edit Document Server<\/a> class that can be used, among other things, to convert HTML documents to PDF using the <a href=\"http:\/\/documentation.devexpress.com\/#DocumentServer\/DevExpressXtraRichEditRichEditDocumentServer_ExportToPdftopic65\">ExportToPdf<\/a> function. This can be used in an ASP.Net web site and will work under normal Medium Trust.<\/p>\n<p>However in the modified Medium Trust used by some hosts (for example, Rackspace) the resulting PDFs come out as blank if the input HTML includes any images. After some experimentation with the trust files (see <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/wyts434y(v=vs.100).aspx\">ASP.NET Trust Levels and Policy Files<\/a>) it turns out the problem is that the <code>ReflectionPermission<\/code> must be present with <code>Flags=\"RestrictedMemberAccess\"<\/code>. Note that <code>Unrestricted=\"true\"<\/code> is not sufficient.<\/p>\n<p>Using: ASP.Net 4.0; DevExpress 13.1;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DevExpress has a Rich Edit Document Server class that can be used, among other things, to convert HTML documents to PDF using the ExportToPdf function. This can be used in an ASP.Net web site and will work under normal Medium Trust. However in the modified Medium Trust used by some hosts (for example, Rackspace) the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[7,8,9],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-devexpress","tag-pdf","tag-trust"],"_links":{"self":[{"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":3,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thedifficultbit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}