PDF not downloading when pressing save button - pdf

I'm trying to download PDF after it was generated using the save button right on the corner But I'm getting an error Failed - Server Problem. Did you guys encounter same problem? On my localhost, it is generating properly, but when it is on the server site, The PDF can't be save at all. I'm not sure about this.
Here's the screen shot
This is the codes that I used to output the generated PDF
ob_flush();
$pdf->Output('graphictable.pdf', 'I');
Any Idea regarding to this? Thanks

Try removing ob_flush(). If that doesn't work, see what happens when you use 'D' instead of 'I' as the download option.

Related

Font Not Displaying Properly in PDF

I am trying to save a pdf from illustrator and I have never had this issue, the font looks fine in illustrator, but when I save the pdf and open the pdf in a pdf viewer the "i" character now has a box beneath the text but the dot of the i stays there.
When viewed in illustrator:
When viewed in a PDF viewer:
I know that when the square shows up it means the font you are trying to use isn't there however the other characters appear fine, it just seems to be the I which is odd. The font passed verification (for reference it is Playfair Display
Does anyone know how to fix this or why this could be occurring? Am I exporting wrong(I've never had this issue before with exporting)?
Thanks in advance!
Update: I solved my question while writing it. The font that was installed was a variable font type (I downloaded it from Google), for some reason it doesn't seem to want to play nicely in a pdf (maybe I'm saving it incorrectly?). I deleted the variable font and installed the static versions of the font and now the issue has gone away.
I don't know too much about variable fonts but it seems like they are maybe a bit finicky?
Hope this can help others!

Converting link-like texts to links

I just noticed some very strange behaviour in my pdf.
I have a link in there (just pure text!) "www.example.com".
Now when I view this in my reader (Sumatra & Adobe) this link has a "hand" icon and I'm able to click on it. Even though I just put it as real text in there.
So I converted it to PS (pdftops ), found the text (\000w\000w\000w etc), and just changed the first "W" to "A".
Then I convert it via ps2pdf back into a PDF file, and wonder... No link anymore. (it shows now aww.example.com).
So, back to the ps file, I change the a again to w, and re-convert.
Suddenly the link is there again.
Because of this I'm pretty certain this is some feature with the reader that it's being too smart for its own good.
Which brings me to my question: how can I turn this off? Is there any comment/setting I can give which would disable this behaviour for that specific PDF file?
[the problem is that the reader is just adding "http://" in front of it to create the link, and when clicking, my reader warns me that the link is not safe. Talking about insults and injuries!]
Thanks!

Display the pdf through a link in database

I am working presently on the adf side and I am stuck with some issues.
I have a page where I have to display the pdf files. The pdf files are in another site and the links are present in a column of the database.But when I try to access those links they are downloading rather than displaying. I need to display those pdf files in my inline frame rather than downloading.
I heard many suggestions like write a bean and put the file in session and get display them in page .But I am not clear.
So please help me on this.
I have a check box at the end and the checkbox should be enabled in my page only when the displayed pdf scrolled to end.
Please help me solving those issues.
When you create a link to a PDF there is only so much you can do to make it display in the browser. The most important thing you must do on the server that delivers the PDF is to make sure it is presented with the correct MIME-type and without a content-disposition header value of attachment.
After that, it's up to the browser to either show it in a browser tab or to download the file. I know Chrome will show the PDF in the browser when it's linked to, not sure if it also does that when it's linked in an iframe.
I don't think there's a reliable way to make it work the way you want, simply because it's very browser dependent.

Not able to edit MsBuilds default template

I am currently working on TFS automated build process and I won't able to edit/create my process template using Default Template. I did all the process required to edit the Default Template, the process is specified in above link, https://msdn.microsoft.com/en-us/library/dd647551.aspx.
When I try to edit the imported file, Encoding message box appears. If I click in "OK" in Encoding box then the template file get encoded in unexpected format and "Invalid Markup" message appears in designer view of WF.
Please suggest on this. I know it's difficult to understand the scenario without Images but I m not able to post an Image because I don't have reputation >10.
So It's really very much appreciating if someone help me on the basis of Info. I have provided.
Thanking you in advance :)
If you're running into encoding issues, you can edit the file directly in notepad after checking it out. Then "Save As..." change the encoding, then save. Then try to reopen it. Sometimes
This appears to have solved someone else's issue:
http://enginecore.blogspot.com/2014/01/invalid-markup-in-xaml-in-visual-studio.html
close all files open in Visual Studio
close Visual Studio
delete the .suo file near the .sln
delete bin and obj folders

Print preview of my web page to pdf and save it on server side programmatically

I have a deceitfully difficult problem which I had thought it was easy one at the beginning and yet I have spent more than 3 days on and off in total.
what I simply need to do is to save the print preview of the page to PDF file on server side from code behind initiating by a button click.
I was expecting using an open source and then I thought there would be a code like xyzopencode.savepasgeaspdf(path) but I could not find it. I got really close to solution by saving the PDF but then I realized it did not save the picture it only saved the strings.
I tried the pdfsharp but as long as I see it draws the whole thing from scratch and I am nor sure if I can do it.
The reason I need picture compatible one is I have 3rd party signature controller on my page and my couple of attempts worked without them or any picture but when I added pictures they failed to show to picture or did not create the PDF at all. The perfect solution would be just saving what ever shows up in the print preview as PDF, just like the built in feature of Google chrome (but on server side).