Convert Markdown to pdf with images on mac - macos

This is driving me crazy. I have a jupyter notebook with images and I'm trying to convert it to a pdf on my mac. I've installed pandoc and macTex, but when I try to convert it to pdf the images disappear. Also the formatting for my tables gets messed up. I've tried saving it as a markdown and converting it, but I get the same problem. If I convert to html the images disappear but the table formatting is correct. I've also tried converting it in the terminal with nbconvert, but the images still disappeared. And I tried converting the markdown file with rstudio, but still the images disappeared. I've tried two versions of the code to reference images. The versions are below, both display fine in the jupyter notebook but the first one throws an error and the second one the images disappear. I've googled around, it seems to be a common issue but I'm not seeing a lot of solutions. I really can't believe this is this difficult. Any solution is greatly appreciated.
code with errors:
![Stars_Boxplot](Stars_Boxplot.PNG)
code disappears when rendered:
<img src="Stars_Boxplot.PNG">
Update Solution:
![Stars_Boxplot](/Users/Desktop///Project Research//Stars_Boxplot.PNG)
The issue was it had to be an absolute reference and I had a space in my file path.

Related

LibreOffice Writer - captions crop figures

I am creating a report meant to be read/edited by MS Word. To do that I have created it from scratch and saved as .docx.
In this report I am including some images together with captions. All of the captions were added manually. Everything went fine, I have saved the document and closed Writer.
Now I want to put my hands on it again and, upon opening the report, this is what I am seeing:. Previously the figure was showing fine inside the text box (that inserting a caption creates). The text box is in the same position and size, but there appears to be a boundary over which it just displays white. I can reduce the figure's size inside the boundary of visibility, and a glimpse of the captions appears too .
Note that the red arrow disappears too.
Needless to say, I can not work on a 100+ pages document and then check again each picture, delete it and re-create it, check again the cross references and so on. I would much rather work with LaTeX, but I am required to deliver a .docx file.
I am working on Ubuntu 20.04, Libreoffice is updated to version 6.4.6.2 and the only plugins I have equipped it are TexMath and Zotero.
Thank you for your time.
I noticed the same thing. It seems to be an issue already in Libreoffice Writer between Linux and Windows. If you create a document on Linux with a cropped image and then open the file in Libreoffice on Windows the cropping of that image is already messed up. Happens to me with Libreoffice Version 6.3.5.2.

TCPDF display blank page suddenly in Laravel

I used TCPDF in Laravel project for output pdf that was couple weeks ago. It worked perfect. I copy the project folder for backup. Today I tried to output pdf. Error 503 shows up. so I used backup data but it also problem browser ask me to open pdf or save pdf, when I open it it's all white blank pdf page. I'm guessing Is it my CDN problem?
I need pdf output function. Could you teach me what is cause please? and also if you have recommendation. I would like to know other PDF output library.

Multiple Corrupted Instagram Images from multiple users from API

We have encountered multiple corrupted Instagram Standard Images (612px).
This happens the last 3-4 days. And across multiple Instagram users.
Strangely this issue is only evident when the images are opened using Adobe Photoshop.
When viewed using Mac's finder or Preview this image corrupt problem is not visible.
It affects about 50% of our customers. And mostly about 10-20% of their choosen images. And some can affect around 50-100% of their images.
Example of corrupted images:
http://distilleryimage10.s3.amazonaws.com/5875aa2eb24411e3bfe2124c49cf34ce_8.jpg
http://distilleryimage0.s3.amazonaws.com/3b3452a8b24411e3b352126f9f588c64_8.jpg
Again, this issue is only evident when the photos are being prepared to print.
Or when it is opened using Adobe Photoshop/Acrobat/Illustrator/Indesign.
Please help.
Thanks
Jeff
I managed to solve my issue with the same description. What I first did was download the images to my webserver exactly to what is was online, so I didn't change anything of the file contents, just get en then put in the file.
How I solved my problem? I use PHP to generate the image now after I donwloaded it the same way. This is the simplified version of my script:
<?php
// Create an image instance
$im = imagecreatefromjpeg('instagram_image.jpeg');
// Disable interlacing
imageinterlace($im, false); // did not use this but will do the same
// Save the image
imagejpeg($im, 'instagram_image.jpeg');
imagedestroy($im);
?>
When I started using this simple create and save script it all worked again. It looks like it does nothing but it did a lot for me! Hope it helps someone saving a lot of time, took me 1,5 day to figure out the exact problem.

Why pdftk produced pdf files will not render in Firefox?

I have a site - www.jcrocetta.com.
On this site I have 2 pdf files. One file has blurred data and the other is clear, both files were created with pdftk.
In order to blur out some personal data in the pdf I used Inkscape. But Inkscape only opens/edits one PDF page at a time. After I made my edits in Inkscape I saved the files as .pdf formatted files. At that point I had three separate pdf files, pages 1 through 3. I then used pdftk to concatenate the 3 files into one.
The final pdftk-produced files are on www.jcrocetta.com. Just click the public information button.
In Chrome viewing inline works fine.
Downloading the file from Firefox works fine too.
But viewing inline on Firefox it renders blank pages. How can I fix this?
Also, I know that pdf files not produced with pdftk will render correctly on both Chrome and Firefox.
Thanks for your help.
FireFox has a lovely new feature: It now uses the PDF.js library to render PDF files, instead of calling out to an Adobe Reader plugin, or forcing you to save the file to disk. Unfortunately, it seem that PDF.js isn't quite perfect yet. A quick search shows that other people have the same issue, but the only "solution" I've seen offered boils down to "file a bug report at https://github.com/mozilla/pdf.js/issues or https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=PDF+Viewer".
Also: Do the three individual PDF files render in FireFox, before you use pdftk to concatenate them?

broken image in chrome and firefox works in safari

I have a logo that shows up in Safari but in Chrome it appears as a broken link and simply does not show up at all in Firefox.
<img src="images/logo-01.png"/>
I have re-uploaded it many times and have even tried alternative paths and file names.
anyone know how i might be screwing this up?
I ran into this same problem. For me, it turns out the image was corrupt. If i tried to open the png file up in photoshop, i would get an error saying it could not parse the file.
For whatever reason, safari could display the corrupt file, but chrome could not. This is how i fixed my issue. I noticed "preview" on my macbook could open the file fine. If you are using windows, possibly try paint or gimp or some other program besides photoshop.
I downloaded the corrupt file onto my macbook, opened it with preview (open with > preview)
In the preview app, go to file > duplicate, which makes a copy of your image
Save that duplicated image
As a test, i tried opening that new copied image in photoshop and i was able to!
Upload new file to website. I was able to view the image in chrome now.
Hope that helps anyone who ran into the same problem.
It could be an issue with your file structure. Right now your links are using relative paths (e.g. href="index.html"). This is fine if the file you're referencing is in the same directory as the current page file. But if your current page is located elsewhere, like in a 'pages' directory or something, then you need to tell the links to start from the site root. That would look like href="/index.html" (note the slash). So for the image, you'd have:
<img src="/images/logo-01.png"/>

Resources