When exporting from the .rdl the PDF comes with the same font as the one configured, in my case: 'Segoe UI'.
But when exporting using the APIs Report Viewer, it changes throught the report to a complete different one.
How can I force it to maintain the Segoe UI font
I selected
when exporting?
<df:DefaultFontFamily>Segoe UI</df:DefaultFontFamily> |
Hi,
Thanks for the response. I managed to resolve it with that.
Now I'm seeing that the text that are supposed to be bold are not showing as bold when exporting. Is there a way to fix that?
Also, on another subject: how can I show the page number in each pdf page when exporting?
Regards,
Martin
Queries |
Details |
Now I'm seeing that the text that are supposed to be bold are not showing as bold when exporting. Is there a way to fix that? |
If you want bold letter for exported file. You have to mention Bold in report controller with fonts. Please refer the below document for this,
{ "Roboto Bold", new FileStream(basePath + @"\fonts\roboto\Roboto-Bold.ttf", FileMode.Open, FileAccess.Read) }, |
how can I show the page number in each pdf page when exporting? |
Please use the below expression for getting page number in PDF file. =Globals!PageNumber |
Where should I use the =Globals!PageNumber?
Using it on a TextBox only shows me a 0 at the end of the last page of the report.
Awesome thanks, that worked.
Now I'm encountering a new problem, when modifying the footer, with not only the page number on the left side, but also wanting to have an image on the right side of the report, when exporting it to a PDF (I have a table, and that table kind of divides itself into 4 pages when exporting because it does not fit in only one), the image is not shown, because it seems it's too far to the left, so it goes by the end of the PDF page.
I'm not finding it very intuitive to fix this kind of issues, how can I manage to keep showing the whole table in my API (Report Viewer), with the page number and the image showing, and also keep the same page number and image when exporting to PDF? Seems to have two completely different behaviours.
I'm attaching the report you sent me with this modification so you can clearly see what's going on.
Steps:
- Preview the report (you'll see both the page number to the far left and the image to the far right)
- Touch the "Print Layout" option. Now the image is gone. (this is what's happening to me when exporting to PDF)
Just realized I mistakenly attached an image at the top of the report, ignore that, delete it if you must, the only one that matters is the one in the footer.
The issue happens when the report width is higher than the print layout width and the image is at the far right of the report.
I'm attaching the modified
report, please follow the previously provided
steps to reproduce it.