trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
133 stars 19 forks source link

Page orientation, scale and layout #757

Closed nkubate closed 3 weeks ago

nkubate commented 3 months ago

Subject

Instructions are created in landscape, but in preview or pdf renderer they are created in portrait. Scale and margins are off as well from 2nd page.

Environment

LPub3D v.2.4.7 rev 75 Windows 10 64-bit

Configuration

[Note: Provide details and content below as needed with appropriate redactions. To produce the Windows registry extract for an installed distribution, go to the command console and enter the command line shown. The extract file will be placed on your desktop.]

Logs

LPub3DLog.txt

Screenshots

LPub3D_pref_general LPub3D_pref_renderers LPub3D_page_setup

Steps to reproduce

Tell me how to reproduce this issue. 0 Name: main.ldr 0 Author: NKubate 0 !LICENSE Free for non-commercial use. 0 !LPUB PAGE NUMBER FONT GLOBAL "Arial,16,-1,5,75,0,0,0,0,0,Bold" 0 !LPUB PAGE BACKGROUND GLOBAL PICTURE "F:/BI_background_2024.png" STRETCH 0 !LPUB CALLOUT BORDER GLOBAL SQUARE 1 #ff8306 0.031 MARGINS 0.050 0.050 0 !LPUB CALLOUT ASSEM CAMERA_ANGLES GLOBAL 30.0 60.0 0 !LPUB MULTI_STEP ASSEM CAMERA_ANGLES GLOBAL 40.0 60.0 0 !LPUB HIGHLIGHT_STEP COLOR GLOBAL "#C0FF8306" 0 !LPUB MULTI_STEP STEP_NUMBER FONT GLOBAL "Arial,48,-1,5,75,0,0,0,0,0,Bold" 0 !LPUB CALLOUT STEP_NUMBER FONT GLOBAL "Arial,36,-1,5,75,0,0,0,0,0,Bold" 0 !LPUB CALLOUT PLI PER_STEP GLOBAL FALSE 0 !LPUB PLI INSTANCE_COUNT FONT GLOBAL "Arial,16,-1,5,75,0,0,0,0,0,Bold" 0 !LPUB PLI MODEL_SCALE GLOBAL 0.8000 0 !LPUB STEP_NUMBER FONT GLOBAL "Arial,48,-1,5,75,0,0,0,0,0,Bold" 0 !LPUB ASSEM CAMERA_ANGLES GLOBAL 40.0 60.0 0 !LPUB ASSEM MODEL_SCALE GLOBAL 1.0000 0 !LPUB PAGE ORIENTATION GLOBAL LANDSCAPE 0 !LPUB PAGE SIZE GLOBAL 8.2677 11.6929 A4 PORTRAIT 0 !LPUB MULTI_STEP BEGIN 1 0 0 0 0 1 0 0 0 1 0 0 0 1 3385.dat 1 14 0 8 50 1 0 0 0 1 0 0 0 1 34103.dat 1 14 0 8 30 1 0 0 0 1 0 0 0 1 34103.dat 0 ROTSTEP 0 180 0 REL 1 14 -30 8 10 1 0 0 0 1 0 0 0 1 15573.dat 1 14 30 8 10 -1 0 0 0 1 0 0 0 -1 15573.dat 1 0 0 -8 -50 -1 0 0 0 1 0 0 0 -1 4286.dat 0 STEP 1 0 0 0 20 1 0 0 0 1 0 0 0 1 3795.dat 1 71 0 -16 50 1 0 0 0 1 0 0 0 1 73109.dat 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 1 72 0 -16 100 1 0 0 0 1 0 0 0 1 3668.dat 1 19 -60 -6 100 1 0 0 0 1 0 0 0 1 3749.dat 1 19 60 -6 100 -1 0 0 0 1 0 0 0 -1 3749.dat 0 STEP 1 0 0 0 110 -1 0 0 0 1 0 0 0 -1 50949.dat 1 4 50 -16 70 1 0 0 0 1 0 0 0 1 86996.dat 1 4 -50 -16 70 1 0 0 0 1 0 0 0 1 86996.dat 0 STEP 1 0 0 -8 100 -1 0 0 0 1 0 0 0 -1 3020.dat 1 0 50 -8 20 0 0 1 0 1 0 -1 0 0 3069b.dat 1 4 -50 -8 20 0 0 1 0 1 0 -1 0 0 3069b.dat 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 1 0 0 -8 20 -1 0 0 0 1 0 0 0 -1 51739.dat 1 14 0 -16 80 1 0 0 0 1 0 0 0 1 3020.dat 1 14 0 -16 110 1 0 0 0 1 0 0 0 1 3710.dat 0 STEP 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 0.9133 1 0 10 -16 10 0 0 -1 0 1 0 1 0 0 36840.dat 1 0 -10 -16 10 0 0 1 0 1 0 -1 0 0 36840.dat 1 0 30 -40 110 -1 0 0 0 1 0 0 0 -1 4070.dat 1 0 -30 -40 110 -1 0 0 0 1 0 0 0 -1 4070.dat 0 STEP 1 14 0 -24 80 1 0 0 0 1 0 0 0 1 3020.dat 1 71 0 -24 30 0 0 -1 0 1 0 1 0 0 3021.dat 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 1 14 0 -32 40 0 0 1 0 1 0 -1 0 0 3020.dat 1 0 -10 -24 90 -1 0 0 0 1 0 0 0 -1 54200.dat 1 0 10 -24 90 -1 0 0 0 1 0 0 0 -1 54200.dat 1 71 30 -32 80 0 0 1 0 1 0 -1 0 0 3023.dat 1 71 -30 -32 80 0 0 -1 0 1 0 1 0 0 3023.dat 0 STEP 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 1.1533 0 !LPUB CALLOUT BEGIN 1 16 60 -40 100 0 0 -1 0 1 0 1 0 0 arch_l.ldr 0 !LPUB CALLOUT POINTER BOTTOM 0.199 0.240 0.202 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1 0 !LPUB CALLOUT PLACEMENT TOP CENTER ASSEM OUTSIDE 0 !LPUB CALLOUT ALLOC HORIZONTAL 0 !LPUB CALLOUT END 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 1.0933 0 !LPUB CALLOUT BEGIN 1 16 -60 -40 100 0 0 1 0 1 0 -1 0 0 arch_r.ldr 0 !LPUB CALLOUT POINTER BOTTOM 0.455 0.441 0.547 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1 0 !LPUB CALLOUT PLACEMENT TOP CENTER ASSEM OUTSIDE 0 !LPUB CALLOUT END 0 STEP 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 0.8333 1 4 30 -40 90 0 0 1 0 1 0 -1 0 0 6141.dat 1 4 -30 -40 90 0 0 -1 0 1 0 1 0 0 6141.dat 1 4 -50 -40 70 1 0 0 0 1 0 0 0 1 3623.dat 1 4 50 -40 70 1 0 0 0 1 0 0 0 1 3623.dat 1 72 0 -40 70 1 0 0 0 1 0 0 0 1 15573.dat 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 0 !LPUB CALLOUT BEGIN 1 0 0 -30 140 -1 0 0 0 0 -1 0 -1 0 backend.ldr 0 !LPUB CALLOUT POINTER BOTTOM 0.406 0.327 0.515 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1 0 !LPUB CALLOUT PLACEMENT TOP CENTER ASSEM OUTSIDE 0 !LPUB CALLOUT END 0 ROTSTEP 30 210 0 ABS 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 1.0800 0 !LPUB CALLOUT BEGIN 1 0 20 -20 148 1 0 0 0 0 1 0 -1 0 rearlight_l.ldr 0 !LPUB CALLOUT POINTER CENTER 0 0.160896 0.690909 0 0 0 0 0 0 1 0 !LPUB CALLOUT PLACEMENT BOTTOM CENTER ASSEM OUTSIDE 0 !LPUB CALLOUT END 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 1.1400 0 !LPUB CALLOUT BEGIN 1 0 -20 -20 148 1 0 0 0 0 1 0 -1 0 rearlight_r.ldr 0 !LPUB CALLOUT POINTER CENTER 0 0.446029 0.825974 0 0 0 0 0 0 1 0 !LPUB CALLOUT PLACEMENT BOTTOM CENTER ASSEM OUTSIDE 0 !LPUB CALLOUT END 0 STEP 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 0.9467 1 4 -30 -48 130 -1 0 0 0 1 0 0 0 -1 27925.dat 1 4 30 -48 130 0 0 -1 0 1 0 1 0 0 27925.dat 1 72 0 -10 156 1 0 0 0 0 1 0 -1 0 15573.dat 0 STEP 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 0 !LPUB PLI CONSTRAIN LOCAL HEIGHT 0.8467 1 0 20 -30 164 0 0 -1 1 0 0 0 -1 0 25269.dat 1 0 -20 -30 164 -1 0 0 0 0 -1 0 -1 0 25269.dat 1 4 0 -20 164 0 0 1 -1 0 0 0 -1 0 3069b.dat 0 STEP 1 71 -50 -8 -70 0 0 1 0 1 0 -1 0 0 36841.dat 1 71 50 -8 -70 0 0 -1 0 1 0 1 0 0 36841.dat 0 ROTSTEP 40 300 0 ABS 0 !LPUB MULTI_STEP END 0 !LPUB MULTI_STEP BEGIN 1 4 -72 2 40 0 1 0 0 0 -1 -1 0 0 3023.dat 1 0 -72 2 10 0 1 0 0 0 -1 -1 0 0 3024.dat 1 0 -72 2 -40 0 1 0 0 0 -1 -1 0 0 3710.dat 0 STEP 1 4 -80 2 50 0 1 0 0 0 -1 -1 0 0 3070b.dat 1 4 -80 2 0 0 1 0 0 0 -1 -1 0 0 2431.dat 0 STEP 0 !LPUB MULTI_STEP END 0 // These 6 command lines were auto-generated for highlight current step. 0 // These lines are not saved and should not be modified, but they can be replaced. 0 // Remove comment lines and replace MODEL with DISPLAY_MODEL to override this behaviour. 0 !LPUB INSERT MODEL 0 !LPUB INSERT PAGE 0 STEP 0 ROTSTEP 15 60 0 ABSProvide a sample mpd/ldr file that reproduces the problem.

Expected behaviour

LPub3D_planned The instructions should look like this, so in landscape mode.

Actual behaviour

LPub3D_result Instructions are rendered in portrait mode instead. Scale and margins are messed up from page 2

Workaround

No solution so far despite testing with older versions, different files, renderers and page formats. Issue remains unresolved.

trevorsandy commented 1 month ago

Thank you for reporting this behaviour. I'll take a look.

Cheers,

trevorsandy commented 3 weeks ago

On line 19 in the example model file, you override the landscape page orientation setting with the PAGE SIZE meta command. If you remove, or comment, this line your document should display/export with the intended orientation.

0 !LPUB PAGE ORIENTATION GLOBAL LANDSCAPE
0 !LPUB PAGE SIZE GLOBAL 8.2677 11.6929 A4 PORTRAIT

OrientationScale757

Cheers,