Typora - Automatic Header At Top of Every A4 Page - header

(Could not create a tag called typora because of insufficient reputation)
I have just started using Typora.io to write reports, and one thing that bugs me is the inability to have a header (footer) be generated automatically on top (at the bottom) of every new page. I am new to Markdown and all things related, so I do not even know how closely related Typora is to Markdown. Is there a way to automatically generate headers/ footers for Typora? Thank you very much!

File -> Export -> Export Settings -> PDF -> Header / Footer

Related

Customize Shopware 6 invoice PDF

I'll change the template of the invoice pdf template in shopware 6.
The template self seems to be stored in the database in the table "document".
The pdf is generated by php.
Anyone knows, how to get a complete own customized template ?
The configuration in the backend is not enough.
Thank you.
I wrote an example Theme some time ago, that is extending the basic template: https://github.com/mnaczenski/SwagDocumentTemplate
The core template is located here:https://github.com/shopware/platform/blob/trunk/src/Core/Framework/Resources/views/documents/base.html.twig
So you can overwrite the file in your own theme like described in the documentation by extending the twig file and placing it in the right folder: https://developer.shopware.com/docs/guides/plugins/themes/theme-base-guide
Extend in Twig: {% sw_extends '#Framework/documents/base.html.twig' %}
Folder structure: /src/Resources/views/documents/base.html.twig
Generated PDFs are stored in the database due to German law, they can't be changed after generation. But new generated PDFs are based on the template.
The easiest way to customize your invoice templates is to use the WYSIWYG Document Editor. You can either customize an existing document or create a completely new document. Using one of the predefined document templates provides a good starting point for you to apply your customizations. But you can also start with a blank page.
With the visual editor, you can easily add new elements and variables and see your changes in the live preview. This will save you a lot of time in comparison to going back and forth hundreds of times between making adjustments in your Twig Files and generating new PDFs for testing.
Here is a YouTube Video, which shows you how easy and fast you can edit all your documents: https://youtu.be/fGBMDmVMPvA
I am the developer, which created the WYSIWYG Document Editor Shopware 6 App. Feel free to ask me any questions about the App. I am happy to help you.

How do I export all pages below a page in confluence using a script

I'm capturing meeting notes in a page structure in confluence. I want to export all the meeting notes to a share drive for others to read. I've found notes on how to export a page or a space but not the pages below a page. e.g. I want everything below "Parent Page" but not anything else.
e.g.
Space
Unrelated Pages
Unrelated Pages
Parent of Parent
Parent Page
Child Page 1
Child Page 2
Child page 3
I want to drag the child pages to a share drive. I'm looking to use one of the following e.g. curl, .bat files, python, R etc.
This is on the cloud version of confluence
Go to the Space directory, find the relevant space and click the (i) icon there to get to the space details page. From there, click either Space Operations/PDF Export, or Content Tools/Export, then choose Custom Export. You’ll be able to select the list of pages to be exported. (All pages under a given page can be selected by clicking Deselect All and then clicking the checkbox for the parent page. All child pages will be selected automatically.)
My first instinct was to give the "other" folks who want to read the meeting notes, (read) access to confluence itself - thats what confluence was meant for.
But if you're dead set on living in the 90s and downloading stuff to another drive, you can try the Page Tree Word Exporter plugin (But this is manual)
Script wise, you can do the following:
Get all the child pages with the REST API: Make a GET call to
https://confluence-domain.com/rest/api/content/search?cql=parent={Parent Page-id}
This will return a "results" array with info about the child pages. Parse out the "id" fields. (Hint: if you are using bash, you can use the beautiful jq library https://stedolan.github.io/jq/
Once you have the child page IDs, you can export each individually to PDF using:
wget https://confluence-domain.com/spaces/flyingpdf/pdfpageexport.action?pageId=xxxx -O mypage.pdf
This blog might help you in your coding: http://javamemento.blogspot.no/2016/05/jira-confluence-3.html
Step 1 (bottom left):
Step 2:
To export all pages below a page, check the parent page.
If the export is absent, the admin needs to give you the permissions for it.

Combining a page map with a PDF so that annotations move with pages in updated PDFs

Has anyone managed to provide an end-user with an updated PDF, allowing that user to transfer his local annotations to the new PDF and keeping the annotations on the correct page, even when there are pages inserted into the update PDF at a point earlier in the PDF than the annotations.
I thought there might be a page map or page guid approach that someone has used.
Sorry - I hope that is clear.
Instead of using the page index as ID of the page, you can use the page content stream instead (after decoding/decompression). Most PDF libraries will give you access to that, so you could compute an MD5 hash from the page content and search for that instead on your "updated" file in order to know where to transfer your annotations.
This is assuming that the page content will be indeed identical, which is not a common scenario.

Disable browser cache for displayed in an iFrame PDF by means of TCPDF

I am trying for hours to solve the following caching problem.
My application has the following structure (simplified):
index.php - main page (contains various input fields, submit button and an iframe for dispaying PDF content with the help of TCPDF)
generate.php - generates PDF file based on the supplied POST parameters and stores the file to the filesystem
viewer.php - Displays the PDF document (TCPDF libraries). The iframe loads this script to show the pdf file
The workflow is pretty simple - the user chooses some options and clicks the submit button on the main page. The selected parameters are sent per AJAX by POST to the generate.php script. The script generates the PDF file and stores it to the filesystem. At the end it returns the newly created/edited filename. The filename is fetched in the AJAX callback function, which then refreshes the iframe with the new/edited filename:
viewer.php?filename=NEW_OR_EDITED_FILENAME
Everything is working, but when the file is being replaced, sometimes (NOT ALWAYS), the browser shows the old pdf file, although the new version is on the hard drive. I tried the following solutions:
Add Meta tags to disable cache to the generated HTML by index.php and viewer.php
Disabling cache for jQuery AJAX calls by: jQuery.ajaxSetup({cache: false});
Adding some random string to the the filename parameter:
viewer.php?filename=FILENAME_RANDOMSTRING
The RANDOMSTRING is then removed from the script and the filename is extracted.
None of these solutions worked for me. Tested browsers are: Chrome 25.0.1364.152 and Firefox 19.0. Can someone help me with this?
Thanks in advance
Just had the same problem but after adding a random string it works perfect:
<iframe src="file.pdf?=<?=time();?>"></iframe>
After many hours of trying, the solution I found is to really generate a new file each time (Solution 3 from the question without removing the random string at the end of the file). As a result it was necessary to update the database and to delete the old files on every change. My initial intention was to avoid these actions, but unfortunately no other solution was found

Alfresco Share site's dashlet for document library

I was wondering whether exists any dashlet which allows you to explore a site's document library. As far as I know doesn't exist such dashlet out of the box, there only exists the "Site Content" dashlet but it is slightly limited.
I have been searching around and "googling" and I found these useful resources that could be useful as a starting point if I had to create my own:
http://ecmarchitect.com/archives/2012/05/08/1592
http://code.google.com/p/fme-alfresco-extensions/wiki/GalleryPlusDashlet2
Do somebody know more dashlets/resources targeting this issue? Any suggestion?
As a temporary solution, I'm also thinking in the possibility of taking advantage of the "Web View" dashlet, by configuring in it such URL that retrieves the documentlist region/component in the documentlibrary page. For example:, share/page/components/documentlibrary/documentlist or share/page/site/{site}/documentlibrary?region=documentlist. Maybe it is crazy or what I'm saying doesn't make any sense, but it is just an idea.
Another idea that have just came to my mind is the option of creating a custom Surf/Share page which includes the component/webscript that implements the explorer of the document library, specifically the documentlist component. Then configure the "Web View" dashlet giving the URL that points to the custom page created. Would it make sense?
Thanks in advance.
You are going to see a couple of site visualization and navigation dashlets on Alfresco Visualization Tools available on https://github.com/bhagyas/alfresco-visualization-tools. The project is still at it's initial phase, but you will find interesting snippets of code used to retrieve the document library content trees within the dashlets.
The project was presented by me at Alfresco DevCon in Berlin just a week ago to bring interactive navigation and content analytics. If interested, you can find the slides at the lightening talk slides in the DevCon 2012 site at Alfresco.
Cheers! =)
Hi I've done exactly the same, it was not really needed for a Dashlet but for to embed the documentlibrary of a site in an iframe for another site.
So what I did was indeed create a new page template embedded-documentlibrary.
I've copied first the following files and renamed them:
site-data/pages/documentlibrary.xml
site-data/template-instances/documentlibrary.xml
site-webscripts/org/alfresco/documentlibrary.ftl
If you rename file 3 or put it in another folder, you need to check the paths in file 1 & 2.
So to make only the documentlibrary appear instead of everyting I just removed everything in file 3 within the <div id="alf-hd"> tag.
If you remove the tag, the document-tree will also be removed and it gave some javascript errors. This should be fixed in the latest version, but haven't tied that.
So it's extremely easy to create your own page and instead of navigating to site/documentlibrary you just navigate to site/embedded-documentlibrary or your own name you've chosen.
And yes then you'll need to use the web-view Dashlet to show it.
The only thing you need to know is, that the links open within the iframe. So if you use the web-view Dashlet, you need to open the links in a new window.
For my situation I needed an iframe, in your case you could also just let the freemarker from your Dashlet render the components needed.
There is a document-liberary-display dashlet available in the alfresco add-on list which can be used to show all the documents from document-library on site-dashlet.
http://addons.alfresco.com/addons/document-library-display-dashlet