Can Javascript PptxGenJS library show preview before save? - pptxgenjs

I am using PptxGenJS library to create a pptx files with javascript. I want to preview of pptx before saving. How can I handle it?

I am afraid this is not possible. you need to get the created slides somehow into PowerPoint in order to view it, which requires a save and a load.
To really create a preview capability for slides, you would have to write a full slide rendering engine in JavaScript, which is obviously a huge effort.
Maybe your script can save files somewhere in a temporary place, and create simple macro in PowerPoint which enables some sort of preview, after which files can be saved with their final name and file path?

Related

Symfony / CKEditor / Elfinder : is it possible to convert automatically uploaded image png to jpg?

From Symfony 5, I installed and configured the CKEditor buundle and attach it to the Elfinder bundle.
All works perfectly. Now, for increase the users experiences, I would like convert automatically any png file updated via elfinder to jpg file (for save disk space usage ;) )
Despite my researches, I can't find if there is a CKEditor and/or Elfinder way for upload image.
Nothing in the documentation. I also look the result of the php bin/console config:dump-reference fm_elfinder command, but I don't find anything about a conversion...
Does that mean there isn't a quick/provided way for do what I'm looking for ?
Thanks for any help :)
Are you sure that it will increase the users experiences to convert their png to a jpg image? I don't think so, you will loose a lot of functionalities of png (transparency, color protection, etc.). Do not forget that png image can be compressed too!
If you are sure that, in your case, it will increase the users experience, this bundle does natively not do it. You'll have to code. I saw two solutions:
Solution1: FMElFinderBundle comes with a plugin to resize image. You could perhaps have a look on it to create a new specification which will transform png into jpeg instead of resize it.
Solution2: FMElFinderBundle use the FileSystem Symfony component to store image. This bundle allows developers to change this component (If you want to replace it by an Amazon service as example). You could create your own component by overriding the Symfony filesystem. Just replace the dumpfile or the copy methods. If file is a png, you call the gd2 library to convert it.

Chrome Developer Tools edit CSS on live site and save only changed element modifications

I would like to make a number of suggestions to CSS edits for a page and am using Chrome Developer Tools to modify the page elements. I was wondering if there is any way that I am able to get CDT to save just the modifications that I have made into a single css stylesheet as a kind of summary?
I know that I am able to create a workspace and map a hosted css file to a local file, however, from what I can gather, this just uses your local file in place of the hosted file and does not give me a summary of the specific changes that I've made. Any suggestions?

Meteor - Multi File Select UI to CollectionFS

I've been using yogiben/meteor-autoform-file, which is pretty awesome for uploading files directly to CollectionFS! However, uploading many files is a pain for the user: The user has to click the "+" icon once for each file to upload, and then select each file individually.
I could also use something like Blueimp JQuery File Upload for the multi-file select, but then the files don't get written to CollectionFS.
Is there an easy way to do multi-file select and have the files written to CollectionFS?
I used https://github.com/tomitrescak/meteor-uploads in a previous project. It supports collection-fs, has drag-n-drop and multiple files features. Maybe not as simple to put in place than yogiben's package but still. Take a look as it might fit your needs.

overriding styles defined on production server for DITA XML files

Here is scenario I am working in.
Using Eclipse with IXIASoft DITA CMS and Oxygen XML editor.
Retrieve files stored in DITA CMS and edit in oxygen.
Generate pdf output. PDF creation is controlled by antennae house libraries on a production server and I do not have access to xsl stylesheets or css files on production server.
I tried embedding styles in dita file, but it appears that files on production server override whatever I do. Tried linking to local css file, but it too seems to be overridden.
Also limited by what is allowed in the custom DTD. Did find an outputclass attribute for the p element, but not sure how to use it. Any suggestions.
The PDF output generated via the DITA Open Toolkit (used also by Ixiasoft) is not related in any way to CSS styling. The DITA content gets translated to an XSL-FO format which then gets processed to PDF using a PDF processor like the default Apache FOP.
So you need access to the XSLT code on the server side in order to provide any PDF customization.
Usually a PDF customization without directly modifying the XSLT code from the DITA OT is done like this:
http://www.oxygenxml.com/doc/ug-oxygen/#topics/dita_pdf_output_customization.html
Regards,
Radu
If you cannot add a plugin to the DITA-OT image on the server, you're actually out of luck for changing the PDF output. If, however, you can create a plugin for the DITA-OT image used by Ixiasoft, and can run the ant integrator on that image, then you should be able to change those styles.
Keep in mind that overriding PDF is not for the faint of heart and if you have no experience with XSLT and XSL-FO, I suggest you get a consultant to help you.
Julio J. Vazquez
Write Spirit

Style Drupal's Print Module PDF

How would one do this in Drupal 7? I want to add a few small style edits to the way the PDF outputs. I am using TCPDF. I read somewhere that its not posible with TCPDF, but other sources say it is. Should I be switching to dompdf? I've read the documentation but just can't seem to understand which file generates the PDF.
I have the module successfully generating a PDF from a View, so this is the last step in moving on with this project.
For anytime you want to style PDFs use DOMPDF, it will be less painful. Then style your pdf using print.css in the sites/domain.com/themes/yourtheme/css folder.
You can also copy the print.tpl.php file from the module's folder and paste it in sites/domain.com/themes/yourtheme/templates to choose exactly what you want to display in your pdf.

Resources