Creating PDF files with Html2ps/Html2pdf in CakePHP - Blank pdf being output - cakephp

I've been following http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf and I am using CakePHP 1.3.
My "download" function outputs a blank .pdf. Some others in the above thread have experienced the same problem, however their solutions do not seem to help me.
Does anyone have any ideas?
Thank you

I was getting the same kind of issue. After checking the log, I found that the process function of this class renders a url and generate a PDF from that. If you supply it with a correct url then PDF can be generated. This url must be a valid url or it should not be under any browser authentication.

Related

Error .. Failed to load PDF document (reactjs)

I am having issue while displaying pdf from data URI. I have tried this solution after looking a lot in google, do you guys think I have made any mistake ?
This is the link for codesandbox.
https://codesandbox.io/s/pdf-view-reactjs-4ygjc

Page not found after redirect from other site with parameters

I am trying to get a redirect working from site a to site b with a parameter in the url. For example, I want to go from example.com to mysite.com?code=abc
When doing so, I get a 404 error. The page could not be found. When I manually browse to mysite.com?code=abc , it does get found. Does anyone know what causes this issue? All help is greatly appreciated.
Seems like it's just Intellij which doesn't support this. I tried with another site and it turned out fine.

How to fix "..{content:" error in crm output

I've got an page output ..{content: instead of request output on some standart modules such as Email notifications.
I noticed that it happens when the url contains ...ajax=....
When I remove all ajax in url and remain the core(...modules="..."&action=...) all works fine.
I've try to turn on and turn off AJAX support of modules. It doesn't help.
The examples of the url string:
http://www.localhost/suitecrm/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DOutboundEmailAccounts%26action%3Dindex
Any help would be usefull.
I have already read simular question but answers doesn't help.

LinkedIn share links to PDF documents

I am trying to create buttons on a web page that allow users to share links to PDF documents on LinkedIn. LinkedIn loads a window without any errors but offers no link or preview of the PDF or any indication of what is being shared.
Here are the two methods I have tried. First the plugin method.
<script type="in/share" data-url="http://example.net/DocumentDownload.aspx?Command=Core_Download&entryID=114"></script>
And, secondly with a custom url.
TEST
Encoding the url makes no difference.
The above links are direct document links from a DNN web site using Document Exchange. If I change the urls to any html page it works fine and LinkedIn seems to be able to extract the useful information right from the page and use that for the share details.
Can LinkedIn handle this kind of thing? There is nothing to guide me on the type of links that can be shared. I can't find any information about it. There are no errors in the web console.
Not sure, but you should try to provide LinkedIn with the link that has .pdf at the end, like http://example.com/documents/file1.pdf. I guess LinkedIn just checks the URL if it has .pdf file at the end to decide if it is a PDF document or not.
I have no problem sharing pdf's on LinkedIn. Check it out...
https://www.linkedin.com/sharing/share-offsite/?url=https://www.revoltlib.com/anarchism/the-conquest-of-bread/view.pdf
Works perfectly fine. And view.pdf is a script, not a file, either, so, it's not looking for a PDF file to analyze, so much as headers that indicate you have a PDF file available to analyze, so, in PHP, at DocumentDownload.aspx, we would do...
header('Content-type: application/pdf; charset=utf-8');
This header let's the sharing app know that it can analyze the document as a PDF file and extract useful information from it, as you can see from the screen shot.

Wijmo and Dotnetnuke 7. Has anyone tried it? Not working

Has anyone tried using the wijmo widgets in DNN 7.+ ?
For my example I'm trying to use the upload widget.
If I upload to a path on my server and test, it works (As in the dialog appears to choose a file... the popup)
If I load it within a page on the site, the button shows but nothing happens when clicked.
All script files and necessary markup are correct.
No console erros, nothing. Very confusing.
Wijmo widgets work in DNN 7.+.
The “action” option should be changed to the server’s address of upload.ashx file.
Note: the upload sample can’t be opened by file path(d:/……/upload.html), please make sure it is opened on server.
Thanks,
Richa

Resources