Knitr Bookdown - building high res graphics and hyperlink from RMD - r

I am using R/Rstudio/bookdown to generate a large document with many figures and tables.
I'd like the user to be able to click on the document image and be passed through to a high-res version of the image that is in the document. Ideally this happens in a new browser window, rather than into GIMP, etc.
This could happen by clicking on the document image, or via a simple hyperlink near to the image. Any suggestions?
Ideally I would be able to build the document image and the high-res image at the same time and this could be relatively automated.

Related

Is it possible to create an RMarkdown document in landscape mode?

I am creating a flexdashboard document that looks like this (dashboard style basically). However, our end-users will not be interacting and drilling down to this like one would in a traditional dashboard. Instead, we are going to send these out as PDFs to our audience. I know you can create parameterized reports in a traditonal PDF or HTML RMarkdown report, however I am looking to create that document in a landscape mode/dashboard style view.

SSRS - same PDF report (rdl file), different line height on different systems

When reports from our system in Singapor where copied to our system in Germany they show different formatting: The generated PDF report in Germany has more space between the lines and the footer is not visible.
When reducing the top and bottom padding of the text fields from 2p to 1p the lines are nearly equally high and the footer is back in place.
Checked differences, but not found:
both SQL 2008 R2
same version of report viewer
same configuration of report viewer
same font used
report solution was also copied - no difference
Where can I look for differences? I thought the formatting was only done in rdl file itself? Any Ideas? Please ask for more of my system details, if needed. Thanks.
Additional information from my side:
I generate both reports (same report on different systems) on the same browser and download and open both PDF on the same system with the same Acrobat Reader - so screen resolution is also the same. PDF Properties as Page Size and PDF Producer and Version is also the same.
anonymized report: left Singapor - right Germany
When you are in Preview Mode - Click button to the right of the Print Icon called [PRINT LAYOUT].
Here, you can manipulate the header/footer and margin size in order to fit everything in your report on one page.
Once you've done this, you should be able to go back into the report, right-click outside of the report, or inside the header/Footer and change the properties. You can change the length to the sizes you chose in preview mode that fit everything into your screen. Let me know if this helps

Disable save button in Adobe PDF reader and hide menu bar in IE window

I am trying to render a PDF via servlet,using Itext for getting PDF file.
Need to disable save ,print option in adobe pdf reader menu bar while other options like scroll,find should be there and in addition need to disable the file menu of the browser window in which it is rendered.
I have disabled print and file menu using below code
stamper.setEncryption(null,null,
PdfWriter.HideWindowUI, PdfWriter.STRENGTH40BITS);
stamper.setViewerPreferences(PdfWriter.HideToolbar);
Problem is
disable save button in Adobe PDF reader menu bar (using **Adobe Reader 9**).
We need to distinguish two different aspects: printing and saving.
You can encrypt a file and set the permissions in such a way that printing isn't allowed. However: if you only encrypt a document with an owner password, it is very easy to decrypt the document and to remove the restrictions. Encrypting a document with an owner password only works on a psychological level: for instance: you indicate that the original producer of the document doesn't want the document to be printed.
If you want to avoid that an end users saves a PDF document, you are asking something that is impossible. The only way to avoid that an end user doesn't have a copy of the PDF is by not sending him the PDF. A PDF can't be opened in Adobe Reader without having the actual bytes on the disk. Even if you would disable saving (for instance in the context of a web application), you'd always find the PDF somewhere in the temp files and people would be able to copy that file as many times as they want.
In your code snippet, you try hiding the toolbar (a viewer preference), but that doesn't make sense. Whether or not this viewer preference will be respected entirely depends on the PDF viewer. For instance: in Adobe Reader X and later, you have a special widget that appears when you hover over the document. This widget allows users to save the document.
Even with Adobe Reader 9, hiding the toolbar isn't sufficient: if the user chooses the appropriate menu item or hits the appropriate "hot key", the toolbar would appear and they could happily click the Save button. In addition, they could have right-clicked and chosen "Save" as well.
In short, you're asking the wrong question.
What you need to do is NOT prevent saving BUT control the actual use of the PDF and that's where DRM (Digital Rights Management) comes in. DRM however is usually very expensive, it requires a custom PDF viewer and it's out of the scope of iText.

Fastreport field properties from preview screen

In my application, I create the reports from source code by using fast report.
I wish to give the user the ability to modify the report by using the fast report designer.
Once the changes done by the user, how I can read the preview screen and find properties of certain fields, such as left, top, width, font etc.
TfrxMemoview(report.components[I]).left always results the original value, not the revised.
Thanks
You will have to recreate the preview. The preview is already what you want to print. If you do not like what you see recreate it. But it is possible to read all properties from the preview.

Adobe Acrobat Pro make all pages the same dimension [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
Does anyone know how to change the dimensions of each page on an Acrobat document.
Also how can I see the dimensions of each page seperately??
For example I have a 3 pages document. The first 2 pages are of the same dimensions 8.2 x 11.6 inches. However the 3rd is smaller. How do I make it larger?
Thanks
With Mac OS X and the more recent versions of Acrobat Pro, the PDF printer option does not work. What does work is doing basically the same thing in Preview App. Open the multi page file in Preview, select File>Print. In the Print dialog set your sheet size as if you are using a printer. You may want to select "Auto Rotate", "Scale to Fit" and "Print Entire Image". Then in the lower left corner is the drop button "PDF" and in that menu select "Save as PDF". Give it a new file name, click Save and then you can open the resulting file in whatever PDF app you want and the sheet sizes are the same.
You have to use the Print to a New PDF option using the PDF printer. Once in the dialog box, set the page scaling to 100% and set your page size. Once you do that, your new PDF will be uniform in page sizes.
Open the PDF in MacOS´ Preview App
Chose File menu –> Export as PDF
In the export dialog klick the Details button an select your page size
Click save
All pages of the resulting document will be scaled to that size. The resulting file size is nearly identical to the original PDF, so I conclude, that image resolutions/compressions are not changed.
Hints:
I am not sure whether the "Export as PDF" menu item is available by default or only if Adobe Acrobat is installed.
My first trial was to use Preview App and print (!) into a new PDF, but this leads to additional margins around the page content.
The page sizes are looking different in your PDF because the images were originally set to different DPI (even if images are identical HxW in pixels). The good news is - it's only a display issue - and can be fixed easily.
An image with a higher DPI value would display smaller in a PDF (displays at the 'print-size' of the image). To avoid this, open each image in an image editor like GIMP or Photoshop. Open relevant image print control dialog box and set a suitable uniform DPI info for all the images. Remake the PDF with these new images. If in the new PDF images are too big - redo the DPI setting for each to a higher value. If in the new PDF pages are too small to read on-screen without zooming, again - redo DPI adjustment, this time put a lower DPI value. Ideally, 150 DPI should be good enough for images of 2500X2500 pixel - on a 17 inch monitor set to 1366x768 resolution.
BTW, the PDF file shall print each page at the specified DPI of that page. If all images are same DPI, you'll get a uniform printing.
Hope this helps :)
The above works,(having an original document with mixed pages of 11' and 16' wide).
However auto rotate needs to be off otherwise landscape pages are saved with page white top and bottom, so dont work in full screen view.
Solution is to re open the new PDF in acrobat and crop the first image (carefully to avoid white border), then select page range i.e. all, this then applies to all pages.
job done !

Resources