AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

Set the @outputclass attribute to "landscape" #1 #162

Closed abhinavaditya1989 closed 2 years ago

abhinavaditya1989 commented 3 years ago

I want to transform a topic into landscape mode form portrait, I saw that DITA 3.3 onwards this is supported. What should I update in the XSL-fo in order to get the desired result? I guess we need to set the @outputclass attribute to "landscape" on the topicref. commons.xsl.txt topic.xsl.txt

ToshihikoMakita commented 3 years ago

Current plug-in implementation does not support dynamic portrait/landscape page control by @outputclass. What purpose do you want to use landscape layout to store your contents in it?

abhinavaditya1989 commented 3 years ago

Current plug-in implementation does not support dynamic portrait/landscape page control by @outputclass. What purpose do you want to use landscape layout to store your contents in it?

I have a topic which has a huge table and we want it to be in landscape form and not portrait. We did try @aorinet attribute but that makes the table turn 90 deg counter-clockwise, which does not solve the purpose.

ToshihikoMakita commented 3 years ago

We did try @aorinet attribute but that makes the table turn 90 deg counter-clockwise, which does not solve the purpose.

I understand your situation. I accept your issue as feature request. Before considering implementation, could you offer the simple sample data to this thread?

abhinavaditya1989 commented 3 years ago

Hi Toshihiko,

I have attached the commons.xsl and topic.xsl.txt these ae dita-ot-3.3.4 files. custom_commons.xsl.txt

commons.xsl.txt topic.xsl.txt

And then please find watched the custom commons.xsl and topic.xsl file. custom_commons.xsl.txt custom_topic.xsl.txt

ToshihikoMakita commented 3 years ago

Unfortunately PDF5-ML plug-in is coded based on completely different concept compared with PDF2 plug-in. So usually I never refer to the PDF2 plug-in coding. Are you sure to submit us to implement landscape layout handling to PDF5-ML plug-in? What I wanted is actual DITA map&topic which you want to apply landscape page layout.

abhinavaditya1989 commented 3 years ago

Hi,

I have attached the zip file that has the bookmap. I need to have the c_Appendix_B_Roles_Permissions as landscape.

bm_DRAFT_Application_Management_Console_User_Manualditamap-bundle.zip

abhinavaditya1989 commented 3 years ago

Are you sure to submit us to implement landscape layout handling to PDF5-ML plug-in?

Reply: Yes

ToshihikoMakita commented 3 years ago

Thank you sending sample data archive. However I have two problems:

Regards,

ToshihikoMakita commented 3 years ago

I found the root bookmap bm_DRAFT_Application_Management_Console_User_Manual.ditamap. As the file and path name is very long, UNZIP software could not decompress it normally.

abhinavaditya1989 commented 3 years ago

Pfa the dtd zip file. com.aristocrat.dtd.zip

ToshihikoMakita commented 3 years ago

Thank you very much!

abhinavaditya1989 commented 3 years ago

Hi Toshihiko, Pfa the customized plugins zip folder too. com.aristocrat.pdf - Version 2.zip

ToshihikoMakita commented 3 years ago

I added sample build result. As "Times New Roman" font has no glyph for "✓", I temporary modified config/default_style.xml as follows:

<variable name="General_Serif_Font">serif,Source Serif Pro</variable>

Please download PDF file from here: https://1drv.ms/b/s!AkbL99fLhxKUhsxaZTKZgLwHX-UKlg?e=xINa3Q

The modified plug-in exists develop-landscape-topic branch.

abhinavaditya1989 commented 3 years ago

Hi Toshihiko,

Thanks for the pdf. Actually, I wanted help regarding what should I update in my existing customized plugins so that I have the topicref as landscape. If you could guide me which xsl I need to update and how.

Pfa the dtd and the customized plugin zip folders.

com.aristocrat.dtd.zip com.aristocrat.pdf.zip

I am working on dt-ot-3.3.4. I suppose you must have the dita-ot-3.3.4 folders and files.

Which custom pulgin.xsl I need to update is it the ari_topic.xsl or ari_commons.xsl form the customized com.arisctocrat.pdf?

ToshihikoMakita commented 3 years ago

I built your test data using com.aristocrat.pdf plug-in in DITA-OT 3.3.4 and felt that your stylesheet work is almost finished without getting landscape page.

PDF2 and PDF5-ML plug-in are built on very different processing concepts, For instance, PDF2 is coded by topic based processing. As a result, it is hard to get map level information in topic processing. In contrast, PDF5-ML takes map based processing. If we are writing topic templates, the map information about topicref is always there. So implementing landscape topic is not so difficult.

I'm afraid that it may cost you to customize PDF5-ML plug-in to generate same designed PDF files that your are generating using com.aristocrat.pdf plug-in.

Probably following work will be needed.

The very simple override plug-in example is included in PDF5-ML repository as jp.acme-corporation.pdf.ml .

You can do above work by yourself or we can offer override plug-in development based contracts.

Hope this helps your understanding.

Regards,