Print PDF from FLEX - actionscript-3

Is there the way to print pdf document from flex?

For screen capturing,simple tables and text Alivepdf will do. PurePdf for nested tables.

I have worked on a project that makes possible print preview but it also includes PDF preveiw and generation (PDF print). You can try it yourself at http://blog.kreatx.com/2011/11/11/flex-printing-print-preview-pdf-generation/
there you can find the source as well

Related

embed a pdf archive like it were part of the html code

i had a little question, i want to embed a pdf like it were part of the website, i could rewrite the pdf in html but it will be a lot of work, what would be the best looking option to embed it?
The pdf has pictures and letters with fonts and columns.
Thanks.
I would go with one of the two approaches. One is a native rendering of the PDF content in a DOM node, using PDF.js. It is an open source library that's used as the default PDF viewer in Firefox.
Another way is to emulate the look by converting the PDF pages to images when the PDF is uploaded. You may use imagemagick to parse the pages, and display the content in a slideshow/gallery widget.

Cognos: Read HTML code in PDF

Is it possible to use HTML format code in PDF?
For example, when the field is <b>Test<b> the PDF shows test in bold?
Like putting a setting to a text item that it should read the text as 'HTML'?
Thanks!
No, HTML encoded formatting will not display the way you want in PDF.
You must design your Cognos reports in Report Studio. Formatting applied through Report Studio will display correctly in HTML or PDF versions of your report.
Rich Text Item will almost do what you want.
This control will show on PDF and you can also load it from a database. But it only supports basic tags.
<b>TEST</b> is not valid for this control, However the following link shows how you might be able to approximate this.
http://pic.dhe.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id23310rich_text_item_supported_elements.html

Fill form pdf with flex

I'd like to fill a pdf form with flex.
Data are on my air application and I want to use those to fill a pdf file store on my computer.
Do you have an idea to do that?
thanks
For PDF generation I've used AlivePDF. It works well once you figure it out.
Have you tried AlivePDF with the alivepdf-template extension (they're both available on Google Code)?
Here's a sample of how to use the extension: http://gonzalo.huerta.cl/?p=3

Any good way to convert html table (with colored text, images, etc) to Word, pdf, or Excel

I have a html table. Inside the table are images, links (different font colors, etc). What is the easiest way to get this exported into an ms office format (powerpoint, excel, word, pdf)? I was going to start hand writing this but figured I would throw out this question if there was any thing that would help with this conversion . . . my really low budget solution is to take a screen shot and resize to fit on a page!
You can install a PDF printer and open the html in a browser, then choose print, as if to a normal printer, and the output is converted into a pdf.
For windows you can download and install from this page:
http://www.cutepdf.com/products/cutepdf/writer.asp
This software:
http://www.cutepdf.com/download/converter.exe
http://www.cutepdf.com/download/CuteWriter.exe
For other operating systems it is probably a built in feature when you try to print.
It doesn't always work perfectly, but most of the time I can open any html files I have in adobe, and it will auto convert them to pdf and you can save, usually everything looks the way it should. You can also just open the html in word, but it doesn't work so well if you are using any css.
This page has information on transforming XML to Word XML format: http://www.linkwerk.com/pub/xml/invitation/xml2wordml/
I haven't used it, but perhaps it will be helpful.

Getting PDF to stay in an embedded <object> or <iframe>

I've edited this quite a bit and bolded my question at this point. I realize that PDF won't be fully controllable in the browser, but that's not my issue here. My problem is, well, below in bold.
<div>
<object
data="${pageContext.request.contextPath}/UB04.xml"
type="application/vnd.adobe.xdp+xml"
width="415" height="500"/>
</div>
The XML is actually an XDP file; it gives dynamic data and a URL for a static PDF, and combines them in Adobe Reader. This displays in the browser as desired if it's a PDF, but when put in as an XDP, it takes control of the window and opens itself fullscreen to display the PDF. Serving an all-in-one XDP (with the PDF embedded as base64) has the same issue.
Help me make the XDP behave the same as a PDF?
Alternatively, if I can use iText to glue together the XDP XML and the static PDF template, I can serve the PDF directly, which seems to work just fine. Just not sure how to create PDF that route, which is somewhat underwhelmingly documented online.
This behavior is dictated by the user agent (client), and that is how it should remain. Sorry.
One possible solution: use iText to join the data into the PDF, skipping XDP entirely.
What you are looking for is called Adobe Flashpaper:
http://www.adobe.com/products/flashpaper/examples/
Otherwise you cannot dictate how the user will view the PDF.