PDF nitty gritties

graeme

Member
Location
Bangkok
Just watch - now I have created a whole topic for it, I bet this is the last question I have on the subject! (hahaha - as if! :ROFLMAO: :ROFLMAO: :ROFLMAO:)

Martin , I note that the existing code provides top, bottom, left and right margins on PDF files of 6, 4.5, 7 and 2 mm respectively.

Do you recall if these numbers are from some kind of 'standard' or 'recommendation' or are just 'reasonable for most use'.

Thanks

g

PS
Is this the best place for this?
It occurs to me that it may have broader interest than a coding forum.
 
_______________
message ref: 1632

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
@graeme

Hi Graeme,

Those are the red trim line margins. There is page content outside of them, and those are the optimum default sizes to contain it:

pdf_margins1.png


pdf_margins2.png



pdf_margins.png


The template pages are trimmed to the red trim margins, and then fit together accurately. If printed on the recommended 160gsm "office card" or thicker, they can be butted together like tiles and attached to a backing sheet. If printed on ordinary office paper they would normally be overlapped to the red lines.

For the printed output, Templot has no control over the paper size on the printer, and the trim margins can therefore be set by the user if necessary to whatever is more convenient on their actual paper:

2_161010_110000000.gif


For the PDF output, there is no paper, and Templot has full control of the document size. There is therefore no need for the user to change the trim margins. The page sizes entered can be either the finished size between the trim margins, to which Templot will then add the default margins. Or the full document size (untick the box):

2_031333_590000000.png


How that is then fitted on the paper is determined by the PDF reader program.

Up to you if you want to change things, but it's essential that accurate template registration across the sheet joins does not rely on the alignment of the paper within the printer. You must provide a trim line of some sort as part of the print.

There is more about all this in these old topics:

https://85a.uk/templot/archive/topics/topic_2019.php

https://85a.uk/templot/archive/topics/topic_3496.php

p.s. you mentioned the file pdf_unit.pas -- as far as I can recall, I have never released that file as open-source. Puzzled.

I will post the T1 version of that later today (with the licensed stuff redacted -- making it uncompileable).

cheers,

Martin.
 
_______________
message ref: 1633

graeme

Member
Location
Bangkok
Hi Martin,

Thanks for all this info. It really is very useful.

I had realised the importance of the trim lines, and made sure in my testing that mine always lined up with those produced by T2 for the same settings.

I had also noticed that the documents T2 produced had no size other than the size of the print itself - what you call the "Templot Document Size" in the diagram above, which was a bit of a light bulb moment for me. I had been led down the path producing 'properly' sized documents fitted to A4 (or whatever) sheets.

I suspect that this was due a combination of factors - experience with other software producing PDFs of standard sizes, the library, which of course provides standard settings to do the same, all my testing, which used A4, etc.

Looking at the diagram, though, made me realise that such an effort was ultimately futile, and the right course is indeed to produce a pdf which is just big enough to encompass what we want to print and let the PDF printing program worry about the unprintable area of the physical sheet - exactly as T2 does, in fact! :rolleyes:

One thing I think would be helpful would be a drop-down list of standard sizes (probably just the larger ones) to give suggested (probably somewht conservative) pre-filling for the length/width boxes. I understand that it is likely to be only the largest sizes which would be useful, but such a drop-down would also be comfortably familiar for newcomers. In the end I am not wedded even to this idea and may ditch it. :ROFLMAO:

Anyway, thanks again. (y)

Graeme
 
_______________
message ref: 1635

graeme

Member
Location
Bangkok
Oooh - with regard to the origin of pdf_unit.pas ... I have absolutely no idea.

In my history of changes, it re-appears in the source in a change with the title "Re-add pdf units" on 22-12-2019.

It was certainly created by you as there are sections commented out in the same style you have used everywhere else, but how it came to me I know not. Certainly not by email (I never delete emails) so the only other idea I can think of is that you posted it here in the forum, but a search for pdf_unit turned up nothing too!

A mystery indeed. :unsure:

g
 
_______________
message ref: 1637

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
In my history of changes, it re-appears in the source in a change with the title "Re-add pdf units" on 22-12-2019.

@Greame

Thanks for that. I need to find how and where I posted that to be sure I haven't infringed the PDF licence. There seems to be no end to things needing doing lately. :(

cheers,

Martin.
 
_______________
message ref: 1638

graeme

Member
Location
Bangkok
Thanks for that. I need to find how and where I posted that to be sure I haven't infringed the PDF licence. There seems to be no end to things needing doing lately. :(
Martin,

Would you like me to send you a copy of the file as it was first included in my source directory (i.e. before I started mangling it) so you can see exactly what I received?

g
 
_______________
message ref: 1639

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
One thing I think would be helpful would be a drop-down list of standard sizes (probably just the larger ones) to give suggested (probably somewht conservative) pre-filling for the length/width boxes.
@graeme,

Hi Graeme,

Bear in mind that we are dealing with practical modelmakers, not office workers. They are quite capable of measuring a sheet of paper and deciding how best to fit their track templates on it. I know some like to cut their own paper sizes -- for example an A3 sheet cut in half length-wise produces a long sheet which can be printed on an A4 printer. I think 17" is a standard length (legal paper?) available on most A4 printers.

Would you like me to send you a copy of the file as it was first included in my source directory (i.e. before I started mangling it) so you can see exactly what I received?
Yes please, that would be helpful, thanks. martin at 85a . uk

edit: now found, see next post

cheers,

Martin.
 
_______________
message ref: 1640

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
@graeme

Hi Graeme,

No need to send me the file, thanks, I have found it. I posted it on the old forum at:

https://85a.uk/templot/archive/topics/topic_3563.php#p28592

I have no recollection at all of doing that. I'm finding that my failing memory is hampering development of Templot and making everything take twice as long. :(

There is more PDF stuff in that topic.

cheers,

Martin.
 
_______________
message ref: 1642

Martin Wynne

Admin
Location
West of the Severn UK
Info
Please do not send requests for help direct to me via email.

Post your questions on the forum where everyone can see them and add helpful replies.
_______________
message ref: 1667
Top