ez projects / paradoxpdf / forum / general / how to implement link to pa... / re: how to implement link t...
You need to be logged in to post messages in the forums. New users may register here.
Member since: Posts: 7 |
Wednesday 03 June 2009 11:36:35 am Hi All,
probably a stupid question, but I'm so excited about this new project I just can't get my head around. I would like to embed a link to a PDF file of a certain content node. The content is already an override template: [haupi_pagelayout] Source=pagelayout.tpl MatchFile=haupi_pagelayout.tpl Subdir=templates The content are own classes and a Google map with dynamic markers (according to the classes). Now I'd like to add a link so as to offer the possibility to create a PDF from this page. Therefore I installed PEAR, ezComponents (I hope correctly) and paradoxPDF and added the link as following: <a href={concat('content/view/pdf/', $node.node_id)|ezurl}>paradoxPDF</a> The paradoxPDF override settings are: [ParadoxPDF] Source=haupi_pagelayout_tab.tpl MatchFile=paradoxpdf_layout.tpl Subdir=templates Match[viewmode]=pdf Yet nothing happens when I follow above link on the website. What do I miss? Would be great if you could help me as I'm struggeling with PDFs since weeks.... Many thanks Anita |
|
Member since: Posts: 72 |
Wednesday 03 June 2009 11:58:34 am Hi Anita,
II suppose you followed the installation instructions as outlined in the documentation paradoxpdf. Could you check what is in the file: var / log / paradoxpdf.log? thanks http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 7 |
Wednesday 03 June 2009 12:10:14 pm thanks a lot for your fast reply:-)
I followed the instructions and I also checked the correct java version in /usr/bin/java -version. I created the paradoxpdf directory in var. There I can see the following file: 4b968376ab9a5718d1f4fb1779ec4854.xhtml the var/log directory remains empty but. No log file. But the website is also loading for ever when I use the descripted link. currently it's not coming back = loading forever. Do you have any idea? many thanks Anita |
|
Member since: Posts: 7 |
Wednesday 03 June 2009 12:27:01 pm ..I tried it also with a simple text site (because of google map in the first example), but same behaviour:
paradoxPDF is writing the tmp file in var/paradoxpdf/......xhtml but never stops to load the site and never writes a log file.. many thanks Anita |
|
Member since: Posts: 72 |
Wednesday 03 June 2009 12:29:31 pm Ok,
Try running it from command line : execute this command in the ezpublish installation folder /usr/bin/java -Djava.awt.headless=true -jar extension/paradoxpdf/bin/paradoxpdf.jar var/paradoxpdf/4b968376ab9a5718d1f4fb1779ec4854.xhtml var/paradoxpdf/test.pdf 2>&1 (4b968376ab9a5718d1f4fb1779ec4854.xhtml is the name of the file that have been generated first time) Then send me back the output http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 7 |
Wednesday 03 June 2009 12:32:44 pm then I receive a test.pdf with only a header row "paradox PDF" with pink background.
Do you need the file? |
|
Member since: Posts: 72 |
Wednesday 03 June 2009 12:41:23 pm No i just needed the command output to check if there was a java issue. But the pdf is generated...
Can you send me the header (code between <html> and <body>) of haupi_pagelayout_tab.tpl ? http://www.amiralweb.com Certified eZPublish Expert |
|
Member since: Posts: 7 |
Wednesday 03 June 2009 12:46:23 pm here you go...:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$site.http_equiv.Content-language|wash}" lang="{$site.http_equiv.Content-language|wash}"> <head> {def $basket_is_empty = cond( $current_user.is_logged_in, fetch( shop, basket ).is_empty, 1 ) $current_node_id = first_set( $module_result.node_id, 0 ) $user_hash = concat( $current_user.role_id_list|implode( ',' ), ',', $current_user.limited_assignment_value_list|implode( ',' ) ) $user_id = $current_user.contentobject_id} {if and( $current_node_id|eq(0), is_set( $module_result.path.0 ) , is_set( $module_result.path[$module_result.path|count|dec].node_id ) )} {set $current_node_id = $module_result.path[$module_result.path|count|dec].node_id} {/if} {cache-block keys=array( $uri_string, $basket_is_empty, $user_id )} {def $pagestyle = 'nosidemenu noextrainfo' $locales = fetch( 'content', 'translation_list' ) $pagerootdepth = ezini( 'SiteSettings', 'RootNodeDepth', 'site.ini' ) $indexpage = ezini( 'NodeSettings', 'RootNode', 'content.ini' ) $infobox_count = 0 $path_normalized = '' $path_array = array() $pagedesign_class = fetch( 'content', 'class', hash( 'class_id', 'template_look' ) ) $pagedepth = $module_result.path|count $content_info = hash() } {if $pagedesign_class.object_count|eq( 0 )|not} {def $pagedesign = $pagedesign_class.object_list[0]} {/if} {if is_set( $module_result.content_info )} {set $content_info = $module_result.content_info} {/if} {include uri='design:page_head.tpl'} <style type="text/css"> @import url({"stylesheets/core.css"|ezdesign(no)}); @import url({"stylesheets/debug.css"|ezdesign(no)}); @import url({"stylesheets/pagelayout.css"|ezdesign(no)}); @import url({"stylesheets/content.css"|ezdesign(no)}); @import url({"stylesheets/websitetoolbar.css"|ezdesign(no)}); {foreach ezini( 'StylesheetSettings', 'CSSFileList', 'design.ini' ) as $css_file} @import url({concat( 'stylesheets/', $css_file )|ezdesign}); {/foreach} <!-- @import url({ezini('StylesheetSettings','ClassesCSS','design.ini')|ezroot(no)}); --> <!-- @import url({ezini('StylesheetSettings','SiteCSS','design.ini')|ezroot(no)}); --> @import url({ezini('StylesheetSettings',haupiCSS','design.ini')|ezroot(no)}); @import url({ezini('StylesheetSettings','haupiSiteCSS','design.ini')|ezroot(no)}); @import url({ezini('StylesheetSettings',haupiClassesCSS','design.ini')|ezroot(no)}); </style> <link rel="stylesheet" type="text/css" href={"stylesheets/print.css"|ezdesign} media="print" /> <!-- IE conditional comments; for bug fixes for different IE versions --> <!--[if IE 5]> <style type="text/css"> @import url({"stylesheets/browsers/ie5.css"|ezdesign(no)}); </style> <![endif]--> <!--[if lte IE 7]> <style type="text/css"> @import url({"stylesheets/browsers/ie7lte.css"|ezdesign(no)}); </style> <![endif]--> {foreach ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) as $script} <script language="javascript" type="text/javascript" src={concat( 'javascript/', $script )|ezdesign}></script> {/foreach} </head> <body> many thanks for your support, Mohamed! Anita |
|
Member since: Posts: 72 |
Wednesday 03 June 2009 1:12:09 pm You are welcome Anita. I will send you an invoice once the problem resolved (joke)
Please take a little time to read the paradoxpdf documentation : Javascript is not supported so remove all javascripts, no IE hacks or Mozilla specific css: just use a valid CSS2 stylesheet SoThere is no need for this : <!-- IE conditional comments; for bug fixes for different IE versions --> <!--[if IE 5]> <style type="text/css"> @import url({"stylesheets/browsers/ie5.css"|ezdesign(no)}); </style> <![endif]--> <!--[if lte IE 7]> <style type="text/css"> @import url({"stylesheets/browsers/ie7lte.css"|ezdesign(no)}); </style> <![endif]--> {foreach ezini( 'JavaScriptSettings', 'JavaScriptList', 'design.ini' ) as $script} <script language="javascript" type="text/javascript" src={concat( 'javascript/', $script )|ezdesign}></script> {/foreach} I dont see where you included the print_core.css ? For a best start copy the content of paradoxpdf_layout.tpl (remove inecessary code (comments and doc) ) in your custom pdf layout (You have to create one specialy for pdf ). Then try de generate the pdf, when it works add the necessary css and code to your custom layout. Hope this will help you http://www.amiralweb.com Certified eZPublish Expert |
You need to be logged in to post messages in the forums. New users may register here.