I'm writing a web application for a client that needs to be packaged in a wordpress plugin. The application is built on top of a soap api that returns an array of results that I need to output to a pdf and/or excel document. I'm using two third party libraries to generate the pdf and excel files (tcpdf and phpexcel), but Wordpress won't allow them to modify the header from inside of the plugin to return different types of content. Does anyone know how I can generate and return a pdf/excel document from inside of a Wordpress plugin?
Please refer following TCPDF exmaple link...this will show you how to create pdf using TCPDF.
http://www.tcpdf.org/examples.php
You can also refer post2pdf-converter wordpress plugin which will show you how to convert posts to pdf.
http://wordpress.org/extend/plugins/post2pdf-converter/
Related
I am working for an office-add-in for PowerPoint. I need to assign some unique identifier to my files, so that files can be identified in any dot net application. I did similar work for Word using custom properties. But for PowerPoint there is no way to read/ write custom property using office.js.
The only way I found using tags:
https://learn.microsoft.com/en-us/office/dev/add-ins/powerpoint/tagging-presentations-slides-shapes
but when I add tags to the presentation, I am not able to see those tags in presentation directly, I am able to read/ write through code only. Also I am not getting a way to read these tags from dot net application.
Any help will be great.
I am storing my files to azure blob. And reading files in my dot net core application to identify whether it has been saved from an office-add in or not. I am using syncfusion library in dot net core application to work with files.
Try this:
Open a PPT file and add a few tags "wwwww", "yyyyy", "zzzzz".
Close and save the file.
Add ".zip" onto the end of the filename.
Use any unzipper program to unzip the file.
Search the folder of unzipped files for "wwwww", "yyyyy", "zzzzz".
This should tell you where/how tags are stored in the OOXML.
Your .NET app should be able to use the OOXML SDK to read the tags of a PPT file.
At present, Syncfusion Presentation library do not have support to read and edit the tags of PowerPoint elements. Please track the status of this feature from below link,
https://www.syncfusion.com/feedback/1800/create-and-edit-tags-for-powerpoint-elements
However, kindly try the below suggested workaround solutions to achieve your requirement,
Using Shape.Name property:
Add a shape with unique name while generating a document from Office-Addin. You can use Shape.Name property for this.
In .NET Core application, identify the corresponding shape by using Shape.ShapeName property of Syncfusion Presentation library and decide whether its generated by Office-Addin or not. You can refer below UG documentation for more details,
https://help.syncfusion.com/file-formats/presentation/working-with-shapes#specifying-shape-properties
Using custom meta-data on Presentation:
PowerPoint Javascript API documentation states that, when we apply the tags for Presentation object it’s maintained as a custom property of PowerPoint document.
Screenshot
If so, you can able to iterate the custom property of PowerPoint document using Presentation.CustomDocumentProperties API of Syncfusion Presentation library. You can refer below UG documentation for more details,
https://help.syncfusion.com/file-formats/presentation/working-with-powerpoint-presentation#adding-custom-document-properties
Note: This update is from Syncfusion team
I am looking for a Drupal 7 extension for displaying a lot of PDF documents in a fashionable way. Preferably with search option to search through the pdf documents that are in a particular folder. Any ideas?
There's really no need for an extension.
design and create a PDF Document content type [admin/structure/types/add]
create a view with exposed filters [admin/structure/views/add]
Easy as that.
You can naturally improve your catalogue with:
A library to extract meta info from PDF docs [ example : http://www.pdfparser.org/], for a faster creation of nodes [node/add]
Some CSS styling
I am using Karma commercial template. I have make the plugin for to upload document or any type of file, which will save in database and give option of Preview in front end. I have search many plugins for the same. I don't want to download the file but only wanted to preview the file in read only mode.Please help for the same.
I have used javascript code using javascrip plugin:
var documentViewer = $('#document-preview').documentViewer();
But it is not usefull for word file as it is useful for image, pdf and text file.
The Google Document Embedder plugin allows you to display files (PDF, Word, etc.) and has options that will prevent downloads.
http://wordpress.org/plugins/google-document-embedder/
I'm developing a CMS aplication in ASP .Net using WebForms and I'm looking for a way to create new PDF files based on a template.
This feature will be used to generate contracts where some placeholders will be replaced with the customer data.
What's the best approach to do that?
Edited: The templates will be static, the main content will never change from customer to customer, only some text in the beginning that will contain the placeholders to recive the customer data. The catch is that I must allow the owner of the application to upload new templates in PDF, with the predetermined placeholders in it to allow the replacement to occur.
I can think of two approaches depending on what type of template you are looking at:
1) Static Template - Say the template does not change with the data (Ex.some standard compliance form etc)
You can try something like iTextSharp, where you have your templates defined in your .net code, and you just "plug in" the relevant data and render the PDF via iTextSharp.
2) Dynamic Templates - Say your template isn't standard and is user customizable. In this case, I'd say go for HTML for designing and "print" the for to PDF. There are many components available.
You may also want to try out components like crystal reports.
I'd go with static HTML templates containing substitution tokens e.g. {FullName} which you can then replace with your data. Once you have created an HTML file like this, say in a StringBuilder, you can use PrinceXML or ABCPdf.net (www.websupergoo.com) to transform your HTML into a PDF.
I hope I am understaning this correctly but wouldn't using standard PDF Form Fields give you the functionality and features you require. Load the PDF template into Adobe Acrobat Full or Foxit Phantom and define standard PDF Form Fields on top of the PDF. Each field has a name, position, font etc.
Then just use a standard PDF library to fill in the PDF form fields and 'flatten' the form fields if that is required.
This solution allows the customer to design new PDF layouts and so long as they define form fields with names that match up then you will be able to drop in the replacement form with a simple file copy.
The iText or iTextSharp library should be able to do all of this quite easily. If not them there are many PDF libraries out there that can.
I'm very new to Drupal, and am wondering if there's an API that external programs can call to transfer text and images directly into my Drupal site.
Yes. There are several ways to accomplish this in Drupal:
If you're doing a one-time import, try the Node Import module --- this lets you import content from a CSV file.
If you want your Drupal site to provide a web-based API to which new content can be POSTed (via, for example, XMLRPC), check out the Services module.
If you want your Drupal site to periodically retrieve content from other sites (RSS feeds, for example), check out FeedAPI.
If you want to write your own PHP code to create new content, check out this article for an introduction.
Not sure what you mean by having a module for importing text, but there is one specifically for images: the Image module. Here is an excerpt from its project page:
... allows users with proper permissions to upload images into Drupal. Thumbnails and additional sizes are created automatically.
Images could be posted individually to the front page, included in stories or grouped in galleries.
Importing text can be performed directly as one of the other existing entity types.