This is a migrated thread and some comments may be shown as answers.

Flattening PDF Exports

2 Answers 133 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kenneth Jackson
Top achievements
Rank 1
Kenneth Jackson asked on 09 Jun 2009, 12:58 PM
We are currently exporting a report to PDF format , our report uses a combination of graphic and text elements.
We use raw printing code to automate the printing of the documents and when raw printing only get the graphical layer.

When printing from a pdf viewer like acrobat , then the document prints perfectly.

It seems that the pdf like many pdf's , the document is still in multiple layers .
In order to get it printing as a single layer , we need to be able to export the pdf in an already
flattened format or flatten it post export.

Does Telerik reporting provide a method by which this can be done ?

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 12 Jun 2009, 08:33 AM
Hello Kenneth,

The pdf generated files by Telerik Reporting do not contain any editable objects like form fields, text annotations, comments and stamps and therefore it does not need flattening. You can consider:
  1. Using Acrobat Professional, open the JavaScript console (Ctrl-J) and type in this.flattenPages(); and press enter.
  2. Telerik Reporting supports JavaScript embedding in PDF files, so you can try this directly. In order to define the JavaScript string that you want to enter in the PDF file, you will need to configure the PDF Rendering Extension. To learn how to configure it, please read Configuring Telerik Reporting. The name of the configuration parameter that you need to use is JavaScript as explained in the Device Information Settings article.You have two options -- to define your JavaScript in the configuration file, or if you are doing a programmatic export, you can pass the JavaScript code through the deviceInfo parameter of the ReportProcessor.Render method.
  3. Does the problem occur when opening the pdfs in the browser directly? What happens if you save the pdfs locally on your machine, open them and print them? We're asking this because upon research for this we found threads elaborating on a problem with the Adobe Acrobat add-in for IE and Firefox. If this is the case, there is not much we can do.
Note that the second approach does not guarantee results as we do not create objects that need flattening.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kenneth Jackson
Top achievements
Rank 1
answered on 12 Jun 2009, 01:44 PM
Thanks for the response , I will investigate these options you've given me.

No there are no issues opening the file anywhere actually. The pdf's we generate from telerik reporting open 100%
in adobe acrobat and in the ie plugin. If printed from there they print 100% too.

The problem comes when we just send the file using raw api printer functions to the printer. At which point
only our background image is printed and none of the text.

Tags
General Discussions
Asked by
Kenneth Jackson
Top achievements
Rank 1
Answers by
Steve
Telerik team
Kenneth Jackson
Top achievements
Rank 1
Share this question
or