PDFsharp MigraDoc Mix: add annotations - pdfsharp

Two remarks:
MigraDoc Viewer is a great tool to render a generated PDF
PDFsharp allows you to insert annotations (Text, etc.) into your PDF.
I would like to see annotations on the Viewer, but need help to get started:
Are annotations part of the DDL specification?
What is needed to render PdfAnnotations in MigraDoc Viewer?
A new DocumentObject class, implementing Serialize(Serializer)?
How to get about rendering it? Just the visual part: show the icon
(possibly transparent), with text closed.
Thanks for hints or any help!

MigraDoc Viewer cannot render PDF. It can show DDL only.
PDF Annotations are not part of DDL and cannot be viewed with the MigraDoc viewer.

Related

How can I integrate itable interactive tables and ipywidget in the same html report generated by voila

In jupyter-notebook, I have a report with interactive tables generated by itables (PyPI module) and graphs generated by ipywidgets that I would like to edit in html with voila.
Separately it works, how can I put the two parts together in one html page ?
Thanks,
Marc S.
I have found the solution, my html page is now fully interactive.

custom ppt templated changes doesn't render rmarkdown

I am attempting to render a powerpoint presentation from rmarkdown.
I downloaded this powerpoint template and associated files from sol-eng and am able to generate the powerpoint as is.
However, if I open the template and do
view -> slide master
and adjust any of the slide master (i.e. change the background color)
close slide master -> save
I get the error "The file may be damaged or it may have been created in a pre-release version of PowerPoint." when I attempt to render the powerpoint.
I am unclear why using the template as is vs changing the background would generate an error in making the powerpoint presentation.
Any suggestions would be helpful:)
it might be that R writes binary differently than Powerpoint. Is it possible to create a ioslide or beamer slide file with the original powerpoint file instead? If you do IOSlides or beamer, the view with only need a web browser and could be a more flexible file for presentation
I used a different computer/version of powerpoint; adjusted the master slide and now it works - still unsure why I couldn't adjust with my version of powerpoint so I am guessing some versioning issue.

Auto print with MigraDoc / PdfSharp

Porting some code from iTextSharp to PdfSharp. In iTextSharp we did this to make the print dialog automatically open when the pdf document is opened in a web browser:
pdfW.AddJavaScript(PdfAction.JavaScript("this.print(true);\r", pdfW));
where pdfW is a PdfWriter
I found this where one of the answers shows opening an existing file with PdfSharp and adding the "open action".
Generate a PDF that automatically prints
I would like to add the open action using MigraDoc to the pdf as its generated. I am using MigraDoc because its at a higher level than PdfSharp. (sections, paragraphs, etc) instead of drawing text and lines)
Also, the pdf is displayed to the user in a browser. Its being sent from an ASP.NET application where the response is the pdf file.
MigraDoc uses PDFsharp to generate the PDF file. You will have to use PDFsharp for special requirements like yours.
You can make the changes after rendering the PDF file with MigraDoc, but before saving it, so the file will be saved only once.
Use the PdfDocument property of the PdfDocumentRenderer class.

Is it possible to convert an html page to a pdf with asp.net?

I want to generate pdf of my webpage. Is it possible? if not then what can be done to get a pdf form which has the data from the database.
Depending on what you need this for, you can create a PDF via the Print menu in Chrome (Save to PDF is a "printer").

Is there a way to remove the Adobe border from an embedded PDF object?

I'm trying to remove the standard PDF frame from an embedded PDF on my page. I'd like just the PDF to show up without the toolbar on top and thick black frame from the page. I don't want the print, save, or anything to effect the look of the page. Below is the code I am using:
<object data="update404.pdf" type="application/pdf" width="693" height="1130">
</object>
Thank you in advance for your help!
Using object to embed PDF documents is not recommend - it will render different results in different devices and browsers and there is no way to make sure that it will look like you intend to. Have a look at the following projects for a better way to embed your project
PDF.JS
https://github.com/mozilla/pdf.js
FlexPaper
http://flexpaper.devaldi.com
Check out PDF Object:
http://pdfobject.com/examples/simplest.html
http://pdfobject.com/
This should let you accomplish what you wanted across all browsers.

Resources