Sorry, my english isn't good.
I have created a pdf file with fpdf in vbscript but when I try to save it directly on a particular path is opened in the browser. Can I save directly or only opens in the browser ?. This is my code:
Dim pdf
Set pdf=CreateJsObject("FPDF")
pdf.CreatePDF
pdf.SetPath("fpdf/")
pdf.SetFont "Arial","B",16
pdf.Open()
pdf.AddPage()
pdf.Cell 40,10,"Hello, world!"
pdf.Close()
filewrite=Server.MapPath("pdf/new.pdf")
pdf.Output filewrite
Related
I have a basic code that opens a pdf, fills a couple of fields and then save again. File canĀ“t be opened with Adobe Reader, popup appears with message "the document is damaged and cannot be repaired". I can open file with any browser. Problem is just with Adobe Reader.
How i can solve this?
When I try printing files from google chrome as a postscript file and then I convert them to a pdf file, The result I cannot recognize the text in the pdf file. But when I try printing from the Firefox browser as a postscript file I can recognize all text in the pdf.
What can I add the option in google chrome that allows it to generate a postscript file as a Firefox postscript?
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 InDesign Server and a soap based application to communicate through the server.
I am able to get all fields of form used in indd document and also able to replace its text/value.
Now, I am looking to get all images used in indd doc and provide upload images options at my application and able to replace the images by user selected images. Can anyone provide script for identify and replace the images.
Secondly, for backward compatibility I have idml of an indd doc. Now how to import or open this idml and convert it to indd doc through script.
Thirdly, how to convert pdf into indd doc.
Please help me with these scripts.
To an IDML file into an .indd file, simply open it and save it
set theIDMLFile to "Macintosh HD:Users:me:Desktop:someidmlfile.idml"
tell application "InDesignServer"
set convertedIDMLDoc to open alias theIDMLFile
tell convertedIDMLDoc
save to ((characters 1 thru -6 of theIDMLFile) & ".indd") as string
end tell
end tell
I need to open a csv file within firefox. By default, it asks me to choose a download location or to open it with an external program. However, regarding the context, I have to display it straight away inside the browser as plain text, without passing by the popup screen which asks me what to do with the file.
I tried to tweak the Firefox "mimetype.rdf" in order to force the content type "text/csv" to be opened in browser. However, I don't find much information about this file, so I was more or less guessing... This is what I came out with:
<RDF:Description RDF:about="urn:mimetype:text/csv"
NC:value="text/csv"
NC:editable="false"
NC:description="CSV page"
NC:fileExtensions="csv">
<NC:handlerProp RDF:resource="urn:mimetype:handler:text/plain"/>
</RDF:Description>
My idea was to force firefox to treat text/csv as text/plain. This code does not work. But anyway, I managed to force content type using "Mason" firefox extension. However, when the browser sees it as a text/plain, it propose me to open it with notepad or download, does not help me much.
I tried other content types, the text/html, text/xml, it always asks me to choose an external application or download.
I tried to use several extensions, "openInBrowser" and "ViewAsText" make me able to do what I want, but I have to explicitely go in a menu and click the "view as text in the browser", no possibility to set a behavior for the content type "text/csv".
How can I explain that I want all the "text/csv" to be opened inside firefox by default?
Any idea?
Thanks
You could have an upload field where the CSV file gets uploaded to the server. Using server-side code (ASPX for example) you could upload the file, then read the contents of the CSV file and display the results using a Response.Write to the browser.