GitBook document file conversion - gitbook

i have created a gitbook account and working on a documentation, i have some difficulties in converting my work into formats(pdf, mobi and epub). Help me out
. i have the link for my work but how to convert it into a format

https://calibre-ebook.com/, Calibre is what you want
Calibre can convert (pdf, epubs, mobi, etc...) to any other book format(pdf, azw3, epub, mobi, even html)

Related

NodeJS - Compile markdown into pdf (from a string in memory) and download it on web page

I'm developing a web page. I want to create an option to generate a .pdf file and allow the user to download it.
Currently I'm using jsPDF but I'm finding it very hard to properly format the document.
I was hoping to find a new way of building it in markdown format, compile it and then download it.
Is there a way that I can do this, in node.js, where say, I have a string in memory (which is the markdown text format), compile that into a pdf and then download it from the page?
I haven't found any package that really does this, if you know, feel free to just let me know which one can achieve this and I'll figure it out.
For such a thing, I recommend building your .pdf file first a HTML file, so you could edit it easily (hardcoded or dynamicaly)
then convert your html file to .pdf file.
there is alot of packages to do this
have a closer look on this package
https://www.npmjs.com/package/html-pdf-node

Convert png/jpg to urf/pwg-raster to print it through IPP

I'm trying to print using NodeJS some PDF file to an IP printer through IPP.
However, my print only supports these document format:
application/octet-stream
image/urf
image/pwg-raster
There're plenty of methods of converting the PDF to an image, but I'm not sure how can I convert that image (png/jpg) to image/urf - image/pwg-raster codification to be able to print it.
Any tips?
While making a printing app, i found myself needing to do exactly that.
And like you, found mostly nothing.
So i made my own, available as standalone utilities here: https://github.com/attah/ppm2pwg/
pdf2printable from there can do pdf to pwg or urf raster directly (they are pretty much the same format).
Also; application/octet-stream just means auto-detect. And apart from the odd broken implementation listing only that, and Postscript printer with bonus PDF support, that is only between the other formats listed.

How to access to iCloud Notes with pyiCloud

I'm trying to access to my iCloud Notes with a python script using pyiCloud framework, but when I try to list the notes it seems that Documents folder is empty. Does anyone know how I should make that?
>>> api.files['com~apple~Notes']['Documents'].dir() It returns:
>>> []
It sounds like you have an authentication problem that you can't get access to your Notes from the file storage (the UbiquityService). This issue might give you some more clues.
On the other note (!), I found the following a better way to get my Notes exported. I have tried a couple of ways mentioned around the web. Although there is no in-app solution to export Notes in a format other than PDF files, I have stumbled upon the following two solutions:
Export in Markdown (or in other formats in the paid version) via the Bear app. I found this way easier and of more quality in terms of keeping the formatting, attachments, etc:
Download the Bear migration Workflow script from here and follow the instructions.
[optional] At this point, you have the HTML files with inline encoded images. Use my script to decode images to get regular HTML files with the images in an accompanying directory.
Install Bear and import the exported files from Notes.
Export the files as Markdown, HTML, or whatever format you desire from File -> Export Notes within the Bear app. Don't forget to check the "Export attachments" box in the export dialog.
Export in HTML (and then convert to Markdown if you want) via the Notes Exporter app. The app gives you HTML files with inline encoded Base64 images saved with .txt extension (?!). Although I personally like this way as it generates output files that mimic closely the original Notes, the hyperlinks are missing in the exported files (it still keeps the hyperlink coloring though):
Download Notes Exporter from here.
Export Notes to the path you choose.
[optional] Rename file extensions to .html.
VoilĂ , now you have your Notes as HTML files with the same formatting and images.
Decode inline Base64 images and save HTML files with images saved in a separate adjacent directory using the script that I wrote for this:
https://gist.github.com/SHi-ON/945ea2272ea4bb29e13bd0305370da90
Hope this helps to give you an idea!

Package convert from .doc to html

I am using mammoth npm package to convert docx to html, but it is not usable for doc files.
So which package to use to convert doc files? I have searched many but not found.
I am using nodejs.
I don't think you could find a package allowing you to convert doc files (and if you ever find one, I doubt it will have a good accuracy).
DOCX is an open file format (it's just XML : DOCX), whereas the DOC format is proprietary, so it will be way harder to get the wanted informations, if even possible.

Convert any document, image, text file into PDF

I want to convert any documents or image or text file into PDF for all the OS.
I tried the approach with node-msoffice-pdf, and its working fine for Windows OS but not working in other OS.
Question:
How to convert docs, images, textfile to pdf in nodejs?
I used wkhtmltopdf from years to manage pdf conversion.
https://github.com/devongovett/node-wkhtmltopdf
You can either render an html file and pass it to the module, or render a pdf directly from an url.
If fidelity/conversion quality is important to you, for Word documents (doc/docx) you could try our freemium https://www.npmjs.com/package/#nativedocuments/docx-wasm which will perform the conversion locally (ie where node is running), without the need to LibreOffice etc.

Resources