I know the documentation says to add ?presentme=true to the URL. I am trying to knit to a local HTML file and I can not add a ? when renaming the knited file.
Is it something to add to the yaml?
You do not rename your file or add something to the YAML. After knit, you may click on "Open in Browser" and just add ?presentme=true after ".html" in the address bar.
Just to give you an example. In my case, this is at the address bar after opening the .html file generated:
file:///Documents/ioslides-present.html#1
To start presenter mode, this is the new location:
file:///Documents/ioslides-present.html?presentme=true
Related
I have tried to create a new file in Brackets code editor. It shows up an error message as below.
"Error Creating File: An error occurred when trying to create the file. The target directory cannot be modified.
I had the same problem and I figured it out.
Instead of going File->New you have to right click on the folder section in brackets and then select new File which will create a new file in your current folder as well as in the Working Files section.
See image below of where to right click (right click in the red circle):
I added the file Bootstrap.html to the folder 'Full Stack Dev'
I am currently trying to use CSS to stylize my application in Apex 5. The problem I am having is that when I write my CSS code in the "inline" section of any page in the application, then the CSS code works, but if I write the CSS code on Notepad and then upload the file and reference the file within my application, then the CSS code does not work. I have written several lines of CSS code, so I'll just post one small section of it as a sample so that you all can see my format:
body{
font: bold 12px/16px "Times New Roman";
}
I have uploaded the file in the Static Application Files section of the Shared Components page of the application. I have then tried referencing the file in different places, such as at the page level and user interface level, but nothing has worked so far. I'm very new to CSS, so any insight would be greatly appreciated. Thank you in advance!
After uploading the file have to be displayed in the list of static files. The list of files have a column Reference, which contain a string like this: #APP_IMAGES#test.css. Copy this string and put it, for example, on the page in the section CSS - File URLs. This should work.
Then make sure that file reference works. Open your page and take a look on a list of CSS files. The same functionality is present in all browsers, but it is accessible by different ways. In IE:
Press F12.
Open Network tab.
Press "Enable network traffic capturing" (a green triangle in the left top corner).
Reload the page. A list of files appears.
Find your file in a list:
If the file is not present, then you copied an incorrect link, or you copied it into an incorrect place, etc.
If the file is present, normally it should have status 200 (the Result column). If a status is not 200, there could be a lot of reasons (depending on the status).
If the file is present with the status 200, your CSS property doesn't work, because it is overridden with another CSS. To define with which one, go to the Dom Explorer tab.
You can try this approach:
On server, go to ORACHE_HOME/apex/images/css (path can be different, but you can find it by .css extension)
Put you file here
Id editor, in page properties, go to the CSS -> File URLs section
Write path like this: /i/css/new.css (i - in general, alias for your images directory)
After uploading a PDF to the Media Archive, I am trying to link to it from a page on a site.
While editing content, I use the hyperlink tool then select the PDF I want to link to via the URL input box.
After saving and publishing the content, clicking the link downloads the PDF and I don't see any apparent way to make this view-able in the browser by using the current Media ID Composite provides. When rendered, we get this:
pdf
Is there a way that I can reference a PDF without using the Media ID and simply use the file name instead?
Here is the Request/Response header info:
After reading what Pauli Østerø said, I understand the problem but am still not able to think of a solution.
I can get the PDF to view in the browser by adding ?download=false to the href URL via Developer Tools. But when I try to add ?download=false to the href through Composite, it doesn't take affect and I get the console output: "Resource interpreted as Document but transferred with MIME type application/pdf: "http://c1.wittenauers.com/media/4afb7bc8-f703-469d-a9b2-a524d8f93dcb/ryc7iw/CompositeDocumentation.PDF"."
Here is the network trace that was asked for by Pauli. In the image, I included the bit where I add ?download=false to the URL, in source view, just in case there could be another way to add it.
Edit: URL and headers for the page.
Here is the link to the page that contains the link:
http://c1.wittenauers.com/cafe/test
Here is the headers for the page containing the link:
From what you're experiencing, it seems to me that Composite have gotten the MIME type of your uploaded file wrong, and is therefor not correctly telling the browser that this file is a pdf, and the browser doesn't know what to do with it.
Try deleting the file and uploading it again.
Try add ?download=false and the end of the href to the file. You prob. need to go into source mode of the content editor.
This is the exact line in the Source Code which is responsible for this behavior, and the logic is as follows
If there is no Querystring named download, the attachment is determined by the Mime Type. Only png, gif and jpeg will be shown inline, the rest will be shown as attachment.
If there is a Querystring named download with a value of false, it will override the Mime Type check and always force the Content-Disposition to be inline.
I made a quick test here to show that the behaviour is a expected. At least in my Chrome browser in Windows 8
Force download: https://www.dokument24.dk/media/9fdd29da-dde8-41f7-ba4c-1117059fdf06/z8srMQ/test/Prisblad%202015%20inkl%20moms.pdf
Show in browser: https://www.dokument24.dk/media/9fdd29da-dde8-41f7-ba4c-1117059fdf06/z8srMQ/test/Prisblad%202015%20inkl%20moms.pdf?download=false
Expanding on Pauli's answer, you can add the following snippet to your page template to automatically add the '?download=false' to all pdf links.
$("a").each(function () {
if (this.href.includes(".pdf")) {
this.href = this.href + "?download=false";
}
})
I have been using VS Code for a while now and I am loving it. But
there is a small problem with code formatting. It does not work in handlebars (*.hbs) files. This option is simply unavailable while editing hbs file.
I have tried 'Beautify' extension, but it does not work properly for handlebars - it completely destroys the code.
Any help (or explanation of what am I doing wrong) on that topic would be much appreciated.
EDIT: Same issue applies to *.scss files. Can not format those either.
You can click in the bottom right corner on 'Handlebars' and change the language mode to HTML. Then the 'format code' option will be shown.
To manually format code:
Let's say the .hbs file we're working on is a .js file.
Click the file language option (right side down)
Change the file language to .js
Click anywhere in the file
Press Shift Alt F
To automatically format code on save:
Press Ctrl , to open user preferences
Enter the following code in the opened settings file
{
"editor.formatOnSave": true,
"html.format.enable": true,
"html.format.indentHandlebars": true,
"html.format.maxPreserveNewLines": 0
}
Save file
Source
I am trying to view the pdf file created using mpdf.
On using the command as
$pdf = $mpdf->Output('mep.pdf','I');
the pdf gets downloaded rather.
Although, I: send the file inline to the browser. The plug-in is used if available. The name given by filename is used when one selects the "Save as" option on the link generating the PDF.
I would like to view the pdf in the browser and depending on the user choice to download it, print it or just view it and exit.
Kindly help. Thanks.
It depends on the browser whether it can and will display PDF files inline. But to help it a little you should at least tell the browser that it's a PDF file. You can do this by sending a content-type header:
header('Content-Type: application/pdf');
This line should be executed before sending the PDF contents.
You can use this. May be it will help you.
include file:
include_once './mpdf/mpdf.php';
create object of mpdf:
$pdf =new mPDF("","A4","","",10,10,10,10,6,3);
$mpdf->WriteHTML('Text which you want in PDF file');
$pdf->Output('filename.pdf','I');
Still not able to view file:
define content type of header
header('Content-Type: application/pdf',charset=utf-8');