I am new to the PDF creations from OSX.
I want to convert my HTML file to the PDF file,Please help me out which is best way to convert .
I have try to search but getting only IOS supported classes.
https://www.pdftron.com/pdfnet/mobile/ios_pdf_library.html
I have found below link for OSX but some method are deprecated and not properly working.
PDF Creation in Cocoa
Related
I'm trying to convert pdf to pptx invoking adobe acrobat using AppleScript.
Below code executes fine without any error but there isn't any output created.
--somecode--
save active doc to filePath using conversion "com.adobe.acrobat.pptx"
conversion using text class works fine.
save active doc to filePath using conversion "com.adobe.acrobat.plain-text"
I found this on adobe forum, and it remained unresolved(pdf to html).
https://community.adobe.com/t5/acrobat-sdk/pdf-to-html-conversion-with-interapplication-communication-api-in-mac-os/td-p/9294002
Just to add I'm using adobe acrobat pro dc trial version.
Thanks
I was able to make it work. Used AppleScript to invoke adobe javascript.
Going through posts in various forums, found a user following the same approach for rtf documents.
set myScript to "this.saveAs(\""& output_file_path && "\", \"com.adobe.acrobat.pptx\");"
do script myScript
instead of
save active doc to filePath using conversion "com.adobe.acrobat.pptx"
I am using Django 1.9. I am making an app which outputs an inventory as PDF.
Also using this library I can preview the pdf before finally outputting it. Which library can I use for this? Any suggestions..
ReportLab is a library that outputs PDF files dynamically using Django views. You can go through https://docs.djangoproject.com/en/1.9/howto/outputting-pdf/ to learn more about it.
I use Ionic framework for building mobile app. I call a webapi service,and it returns a byte array to me.(thi byte array is a pdf file that saved in db.) Now, I want to show this pdf file on my mobile application. How can I show a pdf file using ionic?
I read articles on net. But I can not achieve open pdf file. Can anyone give me idea ?
Thanks in advance.
What I did to achieve this was to send the PDF by email using the following plugin : https://github.com/katzer/cordova-plugin-email-composer
Then, you will be able to open the PDF. I did not find a better solution with Ionic.
I am looking for a way to replace text in an PDF document in my Mac Application. But the problem is that I don't know how. I am thinking of converting the PDF to an HTML file, so I can use stringByReplacingOccurrencesOfString: and then converting it back to an PDF, but I can not find out how.
I also tried to replace the text using CGPDFDocumentRef but I couldn't find a valide method.
Can anyone please help me to solve this issue?
Thanks, David
It is not possible to replace text in PDF using CGPDF* API. PDF -> HTML -> PDF will not work because the double conversion will loose content (PDF and HTML formats are not quite compatible).
The only solution is to find a 3rd party toolkit that supports this functionality.
I would like to convert pdf, doc files to html files using Cocoa
Please help me in this.
Thanks in advance,
You can convert Word files to HTML using NSAttributedString. You can't do this in pure Cocoa for PDF files; you'll have to use a conversion tool, such as stigi suggested. To do that, use NSTask.
Cocoa's PDFKit framework can convert a PDF file to text, through PDFDocument's -string method for example. Of course this won't copy images or formatting though, and it depends on PDFKit being able to recognize text in the file.
there are a couple of tools for the unix commandline that do such kind of conversions.
check out http://pdftohtml.sourceforge.net/ & http://rtf2html.sourceforge.net/
you may see if there are other tools like this.
but to get back to your question. these command line tools can be called from within your cocoa app (won't work on the iphone) and produce the html result.
check out this link for a guide on how to embed such command line tools within your app.