This topic is locked

PDFview question

7/21/2010 12:49:42 AM
PHPRunner General questions
H
hernanccs author

Hi folks
I'm building a project where i modified the action of the view button on the list page; every time i press the view button it opens the view page on a new tab or window, but i need to open the pdfview directly instead of the html view where i have to click the pdf link to enable the function?
The pdfview link by default is on the top right corner and the link is as follow

http://127.0.0.1/new/factura_clientes_view.php?editid1=1#'>http://127.0.0.1/new/factura_clientes_view.php?editid1=1#
if i paste this link directly on the browser it has the sale result as if i paste the link without the #

(http://127.0.0.1/new/factura_clientes_view.php?editid1=1)
The event i added is

Event List Page: after record processed

$editlink ="editid1=".htmlspecialchars(rawurlencode($data["id_factura"]));

$record["viewlink_attrs"]=" target=_blank href=\"factura_clientes_view.php?".$editlink."\" ";
Any idea if this can be done?
I would also like to know why if i search for PDF i get 0 matches <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=14832&image=1&table=forumtopics' class='bbc_emoticon' alt=':(' />
thanks

H
hernanccs author 7/21/2010



Hi folks
I'm building a project where i modified the action of the view button on the list page; every time i press the view button it opens the view page on a new tab or window, but i need to open the pdfview directly instead of the html view where i have to click the pdf link to enable the function?
The pdfview link by default is on the top right corner and the link is as follow

http://127.0.0.1/new/factura_clientes_view.php?editid1=1#'>http://127.0.0.1/new/factura_clientes_view.php?editid1=1#
if i paste this link directly on the browser it has the sale result as if i paste the link without the #

(http://127.0.0.1/new/factura_clientes_view.php?editid1=1)
The event i added is

Event List Page: after record processed

$editlink ="editid1=".htmlspecialchars(rawurlencode($data["id_factura"]));

$record["viewlink_attrs"]=" target=_blank href=\"factura_clientes_view.php?".$editlink."\" ";
Any idea if this can be done?
I would also like to know why if i search for PDF i get 0 matches <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=51282&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
thanks


Hi, after some researching i found out i can do it running this command on the events after record processed

$editlink ="editid1=".htmlspecialchars(rawurlencode($data["id_factura"]));

$record["viewlink_attrs"]=" target=_blank href=\"plugins/html2ps/demo/html2ps.php?process_mode=single&URL=http://127.0.0.1/facturacion/print/factura_clientes_view.php?".$editlink."\"; ";
but, it only work if the project does not use have a login page. If the project has users then the printed page say that the session expired.
Any suggestion for a working solution?
Thanks

J
Jane 7/21/2010

Hi,
unfortunately it's not possible to open PDF file without view page.

As workaround you can run 'PDF view' option manually on the View page: JavaScript onload event on the Eventstab:

RunPDF();



Then open PDF file using created link.